Hi Every two minutes i want to check whether i received some message so want to reload my page every 2 minutes how to reload my php page using javascript
A:
Quick and dirty:
setTimeout( function() {
location.reload()
}, 120000);
Though I think there could possibly be a fancier way of doing this, this is just what I know though.
meder
2010-06-17 04:12:30
A:
I recommend looking into doing it with ajax. Look at the jQuery library, or any of the JavaScript libraries.
mikelbring
2010-06-17 04:12:31
+3
A:
Why are you sticking on javascript. You can do this without Javascript too.
<meta http-equiv="refresh" content="2;url=http://path/to/the/page" />
Hi Its working good is there any advantage of using this in meta tag instead of using in javascript
udaya
2010-06-17 07:58:52
If the user has javascript disabled this will continue to work :)
AntonioCS
2010-06-17 10:51:31