WML » Tags » do

Syntax:
<do> ... </do>

The do tag is a card-level user interface. It serves as a general mechanism for the user to activate a task. This is typically performed by the user clicking on a word or phrase in the display. The exact appearance in the display may prove to be very browser dependent.

A task is performed in response to an event. There are four tasks in WML: go, noop, prev, and refresh.
 
A do element can be nested inside a template element on the deck-level. A do element on the deck level will be automatically applied to all cards in the deck. This is equivalent to actually having the do element inside each card.
 
A do element can also be nested inside card elements on the card-level. When a do element in a deck and in a card are given the same name, this creates an event binding. An event binding permits the card to shadow the deck do element. By shadow we mean the card can override any code on the deck-level that would normallybe applied to the card.
 
Nested Tags:  go  noop  prev  refresh

Examples

Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>

<template>
   <do type="prev" label="back">
      <prev />
   </do>
</template>

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

<card id="card2" title="Card 2">
<p>
<do type="prev">
   <noop />
</do>
DevGuru is great!</p>
</card>

</wml>
Language(s): WML

See Also: