PDA

View Full Version : refresh page?



crobinson42
05-21-2010, 04:57 AM
Hello, i have absolutely no experience with javascript.

I am all php and mysql :D

I just have a quick question:


<!--Yee Ha! -->
<a href="javascript:location.reload(true)">Refresh this page</a>


I would like to know how to use javascript to refresh a page after a certain period of time. The above code looks like it will just 'reload', but i would like to set it to reload every 5 minutes If you could either point me towards a tutorial, or just smack me for asking a retarded question...either way i appreciate the response ;-)



-Cory

Nile
05-21-2010, 01:39 PM
Here:


setTimeout(function(){
location.href.reload(true);
}, 50000);

crobinson42
05-21-2010, 01:51 PM
Thanks bro

Nile
05-21-2010, 02:22 PM
No problem, glad to help.

It seems your topic is solved... Please set the status to resolved.. To do this:
Go to your first post ->
Edit your first post ->
Click "Go Advanced" ->
Then in the drop down next to the title, select "RESOLVED"