WML <timer> Tag


A timer is declared inside a WML card with the <timer> element. It must follow the <onevent> elements if they are present. (If there are no <onevent> elements, the <timer> must be the first element inside the <card>.) No more than one <timer> may be present in a card.


This element supports the following attributes:

nametextSets a name for the element.
valuenumber Specifies the timer after which timer will be expired. Timeouts are specified in units of a tenth of a second.
classclass_dataSets a class name for the element.
idelement IDA unique ID for the element.


Following is the example showing usage of <timer> element.

<?xml version="1.0"?>


<card id="splash" title="splash">
  <onevent type="ontimer">
    <go href="#welcome"/>
  <timer value="50"/>
  <a href="#welcome">Enter</a>

<card id="welcome" title="Welcome">
Welcome to the main screen.


When you load this program it shows you following screen:

WAP Exampple19

If you do not select given Enter option then after 5 seconds you will be directed to Welcome page and following screen will be displayed automatically.

WAP Exampple20