Put your text ad here
WestNIC provides reliable web hosting services
This FAQ answers one of over 700 Web development questions submitted by Code Style readers. Sign-up to our premium content service to view the full answer.
A: The most important thing about using timeouts is to create a global variable, a “handle”, by which you can clear the timeout if you need to. The example below defines two functions delayAction() that sets the timeout to execute in 500 milliseconds and cancelAction() which aborts the action. The script inserts two action buttons into the page to trigger these function calls.
… premium content omitted
Access all premium content for $50: sign-up below.
How should I write a script using timeouts?
Come inside, access hundreds of premium content answers. One payment grants life membership to hundreds of developer FAQs.
The PayPal service allows you to pay securely and independently in your own currency. Payments are billed to Metacentric Internet Limited. We never handle your credit card details.
Direct access to hundreds of answers to common Web development questions with full working examples and links to other Web resources. Your subscription provides full answers to all premium content questions including those listed below, plus:
onclick event on my button is not working! (stub article)
iframe browser and filter the URLs? (stub article)