VolcomMky
05-15-2009, 11:13 PM
Hey everyone, I have a question and hope for a answer.
On one of my pages, I have 5 timers running off setTimeouts
But I refresh the Timers every 2 seconds OR 10 seconds. (depending on the browser)
My problem lies in with, when I loop to clear them.
I did a alert and got a number around 844019
alert(totalTimers);
totalTimers is set at the timeouts,
totalTimers = setTimeout('displayTZCountDown('+(countdown-1)+',\''+tzcd+'\');',999);
and here is the loop to clear the timers,
tlc=0;
while(tlc < totalTimers){
clearTimeout(tlc);
tlc=tlc+1;
}
Is there a way to clear All Timers at once?
That way IE wont lag and ask to stop script because of how many loops it has to run through?:confused:
Firefox & Safari work fine.:thumbsup:
On one of my pages, I have 5 timers running off setTimeouts
But I refresh the Timers every 2 seconds OR 10 seconds. (depending on the browser)
My problem lies in with, when I loop to clear them.
I did a alert and got a number around 844019
alert(totalTimers);
totalTimers is set at the timeouts,
totalTimers = setTimeout('displayTZCountDown('+(countdown-1)+',\''+tzcd+'\');',999);
and here is the loop to clear the timers,
tlc=0;
while(tlc < totalTimers){
clearTimeout(tlc);
tlc=tlc+1;
}
Is there a way to clear All Timers at once?
That way IE wont lag and ask to stop script because of how many loops it has to run through?:confused:
Firefox & Safari work fine.:thumbsup: