This code will open a page after 8 seconds. Now I want after it open 20 pages it will stop and run again after 15 minutes.
Someone can help me ?? ASAP
Thanks.
[code=html]
<SCRIPT LANGUAGE = “JavaScript”>
<!–
var secs
var timerID = null
var timerRunning = false
var delay = 1000
function InitializeTimer() // run this function following to the <body onLoad> tag
{
secs = 8
StopTheClock()
StartTheTimer()
}
function StopTheClock()
{
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
function StartTheTimer()
{
if (secs==0)
{
StopTheClock()
window.location = “<?php echo $_SERVER[‘SCRIPT_NAME’];?>/”+”<?php echo rand(100,999);?>”
}
else
{
self.status = secs
secs = secs – 1
timerRunning = true
timerID = self.setTimeout(“StartTheTimer()”, delay)
}
}
//–>
</SCRIPT>