This can cause problems if the timeout event you have identified has already been executed. Pending timeouts quite reasonably can be removed. Already executed timeout actions cannot be removed and may crash the browser if you try to remove them. Be sure that you are really removing a pending timeout.
A better technique is to set flags in global variables and use them to inhibit the creation of a new timeout event if you are using this for a kind of interval timer.
See also: | Window.clearTimeout(), Window.setTimeout() |
Prev | Home | Next |
clearInterval() | Up | client object |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |