Menu
I’m trying to create a counter where it counts from 60 seconds to zero so i made use of the setTimeout function of javascript inside a loop.
[CODE]
var i = 60;
while(i >= 0)
{
setTimeout(theUpdateMethod, 1000);
i–;
}
given the code above, in every second, the textbox’s value is changed with whatever the value of “i” is..
But the problem is the browser halts for 60 seconds, then displays 0. What is the alternative to displaying the value of “i” in everysecond without halting the browser?