Tutorials Point


  WML Home

  WML Tags Reference
  Selected Reading

© 2011 TutorialsPoint.COM


  Home     References     Discussion Forums     About TP  

WML <onevent> Tag


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

Attributes:

This element supports the following attributes:

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

Example:

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 past this program and try to play with it.

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
"http://www.wapforum.org/DTD/wml12.dtd">

<wml>
<onevent type="onenterbackward">
  <go href="#card3"/>
</onevent>

<card id="card1" title="Card 1">
<p>
  <anchor>
     <go href="#card2"/>
     Go to card 2
  </anchor>
</p>

</card>
<card id="card2" title="Card 2">
<p>
   <anchor>
   <prev/>
      Going backwards
   </anchor>
</p>
</card>

<card id="card3" title="Card 3">
<p>
Hello World!
</p>
</card>
</wml>


Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names