Using javascript i want to refresh my page every 2 minutes....Is there any function in javascript ?
-------------------
suresh
Printable View
Using javascript i want to refresh my page every 2 minutes....Is there any function in javascript ?
-------------------
suresh
[CODE]function reload()
{
window.location.reload();
}[/CODE]
this method will reload the page when u call the method.....but not for every two minutes......
the same situation happened for me also ie...to refresh the page every 30 seconds....my friend gave me a piece of code which refreshes every 30 seconds.....but i didn't tried that.....here is that code...
[CODE]
function refreshPeriodic()
{
location.reload();
timerID=setTimeout("refreshPeriodic()",30000);
}
timerID=setTimeout("refreshPeriodic()",30000);
[/CODE]
i think it may be useful for u......
[CODE]
function refreshPeriodic()
{
location.reload();
timerID=setTimeout("refreshPeriodic()",30000);
}
timerID=setTimeout("refreshPeriodic()",30000);
[/CODE]
sorry i don't know why the code is not displayed in the previous reply.........
hi elango i can't see the code..can you upload it. don't use "script" tag..you just post the function.
--------------------
suresh
[CODE]function refreshPeriodic()
{
location.reload();
timerID=setTimeout("refreshPeriodic()",30000);
}
timerID=setTimeout("refreshPeriodic()",30000);[/CODE]
add this
[PHP]<meta http-equiv="refresh" content="10" > [/PHP]
refreshes for every 10 sec
[CODE]
function reFres() {
location.reload(true)
}
/* Set the number below to the amount of delay, in milliseconds,
you want between page reloads: 1 minute = 60000 milliseconds. */
window.setInterval("reFres()",3000);
// End -->
[/CODE]
[CODE]function fun(){
var a=setTimeout(funName(),1000)
}
<body tag ="onload fun()">
<?body>[/CODE]