1||0|126|0| 0|0|0|||||JavaScript on the Probability page|quintopia|1|09:14:25|12/24/2007|On the page at%3A http%3A%2F%2Fwww.cut-the-knot.org%2Fprobability.shtml%0D%0A%0D%0AI have some suggestions about the selection javascript.%0D%0A%0D%0A1%3A When the start button is pressed%2C it fires off a new timer %28which means a new thread%29%2C and a every time the timer triggers it creates a new one. Thus%2C if you press it many times in a row%2C you get many many timers calling the TimerResponse function. Thus%2C when you press it the first time%2C the name of the button should change to %22Speed Up%22. . .just to point out that this feature is available.%0D%0A%0D%0A2%3A When the Stop button is pressed%2C several calls to %22Experiment%22 are already waiting in their own threads %28if Start was pressed several times%29%2C so this button will reset the density array values only to have them immediately incremented again by the waiting function calls. This requires Stop to be pressed again once all those calls have been made to truly reset that density array.%0D%0A%0D%0AThus%2C the Experiment function requires the following line%3A%0D%0A%0D%0Aif %28Auto%29 return%3B%0D%0A%0D%0Aor simply encapsulate the entire method contents with the if %28Auto%29 %7B%7D conditional.%0D%0A%0D%0AHope this was helpful%21 1|1|0|||||RE%3A JavaScript on the Probability page|alexb||09:15:30|12/24/2007|%3E%0D%0A%3EHope this was helpful%21 %0D%0A%0D%0AYes%2C it was. Many thanks. Hope it is better now.%0D%0A