...

View Full Version : how to cause an iframe to refresh?



davidklonski
07-15-2004, 10:10 AM
Hello

asumming I have an IFrame in my code.
Is there a way of causing it to refresh in JavaScript as a result of some event?

thanks
For example:


<iframe src="test.php" name="testFrame" id="testFrame" width="100" height="343"></iframe>
<input type="button" onclick="document.getElementById('testFrame').refresh();">

Of course this doesn't work... I am looking for the correct way of doing it...

thanks in advance

jbot
07-15-2004, 10:49 AM
<a href="Javascript:window.frames['frame_name'].reload(true)" ...>

davidklonski
07-15-2004, 11:34 AM
the following works for me:


document.frames['testFrame'].location.reload(true);


thanks for your help

jbot
07-15-2004, 11:44 AM
where do you call that from (don't say a link - i mean, which frame)?

sorry, didn't really read your original thread. you're using iframes, thought it was a full frameset.

davidklonski
07-15-2004, 12:00 PM
My code is more complex than that.
I am actually calling it from a different iframe in the same page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum