WML » Tags » timer

Syntax:
<timer value=... />

The timer tag serves as a timer clock for a card. The timer is started when the card is entered and stops when you exit the card. You can have only one timer element per card.

You can preset the timer to an amount of time in 1/10th second (decisecond) intervals (i.e., 10 deciseconds is 1 second). Once the timer has spent that amount of time in the card, you can specify an event to occur, such as going to a different card or deck. This permits you to handle inactivity or idle time on a site. (The timer counts down to zero starting from the specified time value.)
 
This tag may be used with the card, onevent, and template elements. Both the card and template tags have ontimer attributes. The onevent tag uses the type attribute set to "ontimer".
 
Nested Tags:  None

Examples

Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>

<card id="card1" ontimer="#card2">
<timer value="50" />
<p>
DevGuru
</p>
</card>

<card id="card2">
<onevent type="ontimer">
<prev />
</onevent>
<timer value="50" />
<p>
is great!
</p>
</card>

</wml>
Language(s): WML
Code:
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" ontimer="exit.wml">
<timer name="gobyebye" value="50" />
<p>
This site self destructs in $gobyebye deciseconds!
</p>
</card>
</wml>
Explanation:

This example assigns a time out value to the variable gobyebye.

Language(s): WML

See Also: