WML <onevent> Tag

        The <onevent>...</onevent> tags are used to create event handlers.


        This element supports the following attributes:

        • onenterbackward
        • onenterforward
        • onpick
        • ontimer
        Defines a type of event occurred.
        classclass dataSets a class name for the element.
        idelement IDA unique ID for the element.


        Following is the example showing usage of <onevent> element. In this example, whenever you try to go back from second card to first card then onenterbackward occurs which moves you to card number three. Copy and paste this program and try to play with it.

        <?xml version="1.0"?>
        <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
        <onevent type="onenterbackward">
          <go href="#card3"/>
        <card id="card1" title="Card 1">
             <go href="#card2"/>
             Go to card 2
        <card id="card2" title="Card 2">
              Going backwards
        <card id="card3" title="Card 3">
        Hello World!