WML Events and the
<onevent> Tag
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.
ontimer
-- This event occurs when a timer expires.
onenterbackward
-- This event occurs when a user goes back to a card through the WAP
browser's URL history.
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.
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.
|
Feedback Form (ExpandCollapse)
|
|