Forum Moderators: open

Message Too Old, No Replies

Using Javascript to Refresh an iFrame

         

tjhorne

8:13 pm on Nov 9, 2005 (gmt 0)

10+ Year Member



I have 3 iFrames on my HTML page and I'd like to include three "refresh" buttons within the original HTML page and have each of those buttons reload their respective iFrames. Is this possible and if so can you give me a sample script?

Thanks so much...

tjhorne

8:44 pm on Nov 9, 2005 (gmt 0)

10+ Year Member



Within my frames for the "src" I am referring to a URL, for example:

<iframe src="http://www.google.com" id="myiframe"></iframe>

And this seems to be causing the problem, if I refer to another html file the refresh below works fine:

<a href="JavaScript:myiframe.document.location.reload()">Refresh iFrame</a>

Any ideas if I can get this to work if I am using a URL for my "src"?