Results 1 to 2 of 2

Thread: Refresh page Script

  1. #1
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 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

  2. #2
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 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> 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •