The Timer control can be used when an alert in needed to fire after a certain amount of time has elapsed.

Like almost all SPARK controls, you can trigger events that are fired when the user interacts with the control (see the Event and Methods sections below and the Event Handling article for more information).

This control can emit a boundary every time it ticks; it is useful for timed AJAX interactions or if a certain amount of time has occurred, the Coach page can be automatically closed.


Timeout Value (msecs) Specify the number of milliseconds before this timer "pops"

Repeatable When true, the timer repeats for the current timeout interval

Initially Stopped When true the timer does not start running until specifically started with the start() method


These are the configuration option settings ...


This is the result after 20,000 msecs (20 secs) has passed (This example uses a Modal Alert with the Timer control, once the time specified has elapsed the Modal Alert is set to visible) ...



With the Timer control, there are 2 types of event handlers:

  • On Timeout When timer times out
  • On Boundary Event When there is a boundary event.  This really only works when boundary event is attached to a timer and ends with a “Stay on page”. This event is called when the “Stay on page” event is reached.

You can use JavaScript logic to affect the effects of the control, depending on the event. More information on using these controls can be found in the Event Handling article.


For detailed information on the available methods for this control, access the JS Doc file.


  • Author: Courtney Silva
  • Date Created: June 9, 2015
  • Date Modified: September 21, 2015
Was this article helpful?
0 out of 0 found this helpful