Anyone have a quick javascript to reload a page every five minutes?
Printable View
Anyone have a quick javascript to reload a page every five minutes?
<html>
<head><script>
function doit() {
window.location.href = "index.html";
}
function reloadme() {
setInterval("doit()",300000);
}
</script>
</head>
<body onLoad=" return reloadme()">
hello
</body>
</html>
not sure if syntax is correct
bsw2112
Code:<HTML>
<HEAD>
<SCRIPT LANGUAGE="Javascript">
<!--
var URL = "page.html"; // page to redirect to, enter same filename to reload
var interval = 300000; // in milliseconds. 1 second = 1000
function reload() {
location = URL;
}
setTimeout("reload()", interval);
//-->
</script>
</HEAD>
<BODY>
Stuff
</BODY>
</HTML>
try this i hope u like it:
____________________________________________________
<html>
<head>
<meta http-equiv="Refresh"
content="300;url=YOUR_WEBSITE_NAME">
</head>
<body>
BLA BLA BLA BLA BLA BLA
</body>
</html>
____________________________________________________
NOTE:the number (300) is the number of seconds (300 seconds=5minutes)
BEST REGARDs,