// I replied to this thread some days ago but my reply was not posted (may be I am a new user and dynamicdrive don't trust me much)
// Here is the code
Code:
<html>
<head>
<script type = "text/javascript">
var myTimer;
var myPages = ["http://www.google.com","http://www.yahoo.com", "http://alexa.com"]
var counter = 0;
timer(true);
function timer(bool){
//alert(bool);
if (bool) {
myTimer = setInterval(function(){
handleInterval();
},10000);
}else{
clearInterval(myTimer);
}
}
function handleInterval(){
if (counter >= myPages.length) counter = 0;
var myDoc = window.open(myPages[counter]);
counter++;
setTimeout(function(){myDoc.close()},10000);
}
</script>
</head>
<body>
<button onclick = "timer(true)">Start Timer</button>
<button onclick = "timer(false)">Stop Timer</button>
</body>
</html>
//Just put as many websites in array as so want
// It is currently set to 10 sec. You can change the time interval
//Please wait for 10 seconds. Each site will open and close automatically
Bookmarks