homepage Welcome to WebmasterWorld Guest from 54.204.73.126
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
refresh iframe using javascript
how to refresh iframe
copongcopong

10+ Year Member



 
Msg#: 910 posted 12:15 pm on Nov 21, 2003 (gmt 0)

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

i tried this script:

function refreshiframe()
{
parent.iframeid.location.href="thepage.com"
setTimeout("refreshiframe()", 2700000);
}

then I add it to body onload=" "

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

thanks

 

DrDoc

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



 
Msg#: 910 posted 3:12 pm on Nov 21, 2003 (gmt 0)

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

copongcopong

10+ Year Member



 
Msg#: 910 posted 2:06 am on Nov 23, 2003 (gmt 0)

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

MaximumScripts

10+ Year Member



 
Msg#: 910 posted 10:12 am on Nov 23, 2003 (gmt 0)

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

<META HTTP-EQUIV="Refresh" CONTENT="5">

whereby every 5 seconds, refreshes

copongcopong

10+ Year Member



 
Msg#: 910 posted 7:26 am on Nov 24, 2003 (gmt 0)

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

MaximumScripts

10+ Year Member



 
Msg#: 910 posted 6:48 pm on Nov 24, 2003 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved