Changes

Jump to: navigation, search

JavaScript Timeouts

No change in size, 18:07, 1 February 2016
m
Text replacement - "<google>ADSDAQBOX_FLOW</google>" to "<htmlet>adsdaqbox_flow</htmlet>"
== Setting up JavaScript Timeout to Repeat ==
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
You may have noticed that there is no argument to the ''setTimeout()'' method to tell JavaScript to repeat the timeout once it has expired. If, once the timeout has triggered, you need to run the timeout again all you need to do is make another call to ''setTimeout()'' within the function that was called when the timeout was triggered. We can see this in action by extending our original example. In the example below a function we have named ''timedout()'' is called after 10000 milliseconds. After the alert dialog is dismissed by the user the timeout is set up again so that the process will repeat:

Navigation menu