Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iframe refresh problem. HELP!

    I have a page which consist of an iframe which refreshes every minute. The function that does the iframe refresh is contained in the frame itself using this code:

    <script language="javascript">
    var ctr = 0;
    var refreshRate = 60;
    ticker();

    function ticker() {
    //do some processes
    // set result to var val;
    var val = 'some value';
    ctr++;
    setTimeout("ticker()",1000);
    if (ctr == refreshRate) {
    document.location.href = 'processItServlet?myValue=' + val;
    }
    }
    </script>



    By the way....I am using JSP and servlets along with it.

    The code works fine...the iframe refreshes itself every minute....but after sometime....usually an hour later, the iframe page starts to display a "page not found" error. Can anyone help me on this?

  • #2
    Regular Coder oldcrazylegs's Avatar
    Join Date
    Feb 2004
    Location
    East Moline Illinois USA
    Posts
    414
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Why use a script to do what a meta refresh does.

    <meta http-equiv="refresh" content="3600, url=yourfilename.htm">

    Maybe your browser's cache is full after an hour. Just a guess.


  •  

    Posting Permissions

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