Online Advertising - Find jobs - Bad Credit Personal Loans - Debt Consolidation - Find jobs

PDA

View Full Version : refresh page with timing (every 60 seconds)


Namuk
Jul 7th 2008, 6:17 pm
heloo everyone...

i have a problem about my site.. i want to refresh my page every 60 seconds. so how do i can do that...
i can refresh that by clicking the "refresh this page"...

<a href="JavaScript:location.reload(true);">
Refresh this page
</a>

but i don't know how to set the time... anyone can help....please,,,,

thanks....

pflunk
Jul 7th 2008, 6:52 pm
Put this somewhere on your page...


<script type="text/javascript">
setTimeout("location.reload(true)")
</script>

BTW.
You could use instead:
setTimeout("location=location")
which is a bit funnier but still works.

koolman
Jul 7th 2008, 6:56 pm
Simplest way I think we can do is to use the <meta> tag

More info: http://en.wikipedia.org/wiki/Meta_refresh

Namuk
Jul 7th 2008, 7:48 pm
thanks... i got it....

kceleb9
Jul 8th 2008, 3:34 pm
You will need to set a time out each time the page loads.

use something like:

onload=init();

function init()
{
setTimeout(fucntion() {
document.location = document.location.href;
},1000);
}

Adjust the length of the timeout to suit your needs.