Welcome to Developer's Home Thursday, April 24, 2014
Home - DevelopersHome.com

WML Events and the <onevent> Tag


Preferences - Do not show ads

WML supports events and it provides a tag pair, <onevent></onevent>, for handling events. You can specify an action to be taken whenever an event occurs. Four events are supported in WML.

  1. ontimer -- This event occurs when a timer expires.

  2. onenterbackward -- This event occurs when a user goes back to a card through the WAP browser's URL history.

  3. onenterforward -- This event occurs when a user goes to a card in the forward direction. For example, if a user goes to a card by entering its URL directly in the WAP browser, the onenterforward event will be triggered.

  4. onpick -- This event occurs when an item of a selection list is selected or deselected.

The <onevent></onevent> tags are used to create event handlers. Its usage takes the following form:


<onevent type="event_type">
  A single task to be done whenever the event occurs
</onevent>


Tasks that are allowed to be placed between the <onevent> and </onevent> tags include <go>, <prev> and <refresh>. You have seen the <go> and <prev> elements before. We will describe how to use the <refresh> element when we cover variables in this tutorial.


Page 27 of 50 Previous Page | Next Page
Contents at a Glance
Print this Web Page | | Back to Top
Custom Search

Feedback Form (Expand)

What do you think about this web page?






WML Tutorial Table of Contents WML Tutorial Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page