Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

refresh iframe using javascript

how to refresh iframe



12:15 pm on Nov 21, 2003 (gmt 0)

10+ Year Member

is meta-refresh on a page in an iframe reliable to refresh it at n time?

i tried this script:

function refreshiframe()
setTimeout("refreshiframe()", 2700000);

then I add it to body onload=" "

... is there a specific javascript to refresh a page in an iframe?



3:12 pm on Nov 21, 2003 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Is the page trying to refresh itself, or are you trying to refresh the page from the parent document?


2:06 am on Nov 23, 2003 (gmt 0)

10+ Year Member

page in the iframe is trying to refresh itself at at given n time. thanks


10:12 am on Nov 23, 2003 (gmt 0)

10+ Year Member

Then why not just meta-refresh in the <head> of the page inside the IFrame?


whereby every 5 seconds, refreshes


7:26 am on Nov 24, 2003 (gmt 0)

10+ Year Member

my problem using meta-refresh is if the page inside the iframe times-out, it cannot refresh itself. did the javascript i did above would help on this? thanks


6:48 pm on Nov 24, 2003 (gmt 0)

10+ Year Member

If you meta-refresh it, then the above javascript would be unneccessary..And what else then would be timing it out? IF the iframe contains another script to time itslef out, then that needs to be removed. Why tell a page "Reload every xx seconds AND kill yourslef by doing so-and-so-**** every xx seconds."? Unless you're not teling the entire story, either method (javascript or regular meta-tag) will work, but only need one, and then nothing should time it out before it refreshes.

Featured Threads

Hot Threads This Week

Hot Threads This Month