Thursday, January 6, 2011

Refresh Page with Javascript

Hi I have used the following JS for page refresh automatically.


function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}

<body onload="JavaScript:timedRefresh(120000);">

// 12000 - 2 minutes
// 100 - 1 second

No comments: