Page auto reload with parameters

Posted by Mithil Deshmukh on Stack Overflow See other posts from Stack Overflow or by Mithil Deshmukh
Published on 2008-11-17T19:58:02Z Indexed on 2010/04/10 11:33 UTC
Read the original article Hit count: 432

Filed under:
|
|

I am trying to autoreload my page after every 20 seconds. I am using JavaScript for this instead of the <meta>.

I have <body onload="SetTimer()"> and here is my JavaScript function

    function SetTimer(){
        setTimeout('window.location.replace(window.location.pathname)', 20000)
    }

Now my problem is I also pass a parameter within the querystring when this page is loaded first. But when the page relaods again (window.location.pathname does not include the parameter) hence I am not able to assign values to the labels on the page which is based on the parameters passed.

© Stack Overflow or respective owner

Related posts about auto

Related posts about reload