Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-06-2008, 11:13 AM
student101 student101 is offline
Regular Coders
 
Join Date: Feb 2008
Posts: 100
Thanks: 11
Thanked 0 Times in 0 Posts
Question Refresh page Script

Script: Refresh page Script
http://www.dynamicdrive.com/dynamicindex6/refresh.htm

-------------
I am using <meta> to refresh the iframe (this is inside the page that loads in the iframe)
<meta http-equiv="refresh" content="6">

Is there a way with the Refresh page Script to do this;

PHP Code:
if (parent.frames['myframeid'].src != 'mypage.php'){
 - 
run the refresh script till it does show up then stop refreshing

-------------

Cheers
Reply With Quote
  #2  
Old 08-06-2008, 04:45 PM
student101 student101 is offline
Regular Coders
 
Join Date: Feb 2008
Posts: 100
Thanks: 11
Thanked 0 Times in 0 Posts
Question

How to make this work?

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" lang="pl" xml:lang="pl">
<
head>
<
title>iframe reload</title>
<
meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<
script type="text/javascript">


//THIS PART BREAKS and doesn't work, how to fix?

//if(window.frames.reloader.src == "http://www.google.com/"){

//END THIS PART BREAKS


// set your interval in milliseconds
var reloadInterval 3000;
// this will run when the document is fully loaded
function init() {
 
setTimeout('reload()',reloadInterval);
}
// this reloads the iframe, and triggers the next reload interval
function reload() {
 var 
iframe document.getElementById('reloader');
 if (!
iframe) return false;
 
iframe.src iframe.src;
 
setTimeout('reload()',reloadInterval);
}
//}
// load the init() function when the page is fully loaded
window.onload init;
-->
</script>
</head>
<body>
<iframe id="reloader" width="500px" height="400px" src="http://www.google.com/"/>
</body>
</html> 
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:04 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.