WML TAG:  do

<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 normally be applied to the card.
 
Nested Tags:  go  noop  prev  refresh
 
Attributes
 
class
The optional class core attribute is used to assign one or more classes to the element. Multiple classes are separated by white space. The class name is case sensitive (i.e., Stocks and stocks are not the same).
 
id
The optional id core attribute is used to assign a unique name to a tag. The name must be unique to the entire deck and not just unique to a card. The first character of the name can be a letter or the underscore. The remaining characters can be any combination of letters, numbers, or underscores.
 
label
The optional label attribute creates a string label for the element. Some browsers impose a six character limit.
 
name
The optional name attribute specifies a name for the do element. The name must be unique within the same card. However, a name on the card-level can be repeated on the deck-level. When a do element in the deck and in the card are given the same name, this creates an event binding. An event binding permits the card to override (shadow) the deck do element.
 
optional
The optional optional attribute is a Boolean value that if set to true directs the browser to ignore this element. If false, the element cannot be ignored.
 
type
The mandatory type attribute provides information about the intent of the element. It helps improve processing. If the user agent does not recognize the specified type, (e.g., testing, experimental, and vendor specific types), it will be treated as unknown. (The user agent is any software or device that interprets WML.)
 
Permitted values:
Type Description
accept Acknowledgment of acceptance
delete Delete item
help Request for help
options Options or additional operations
prev Backward navigation
reset Clearing or reset
X-*n or x-*n Experimental
vnd* Any mix of
upper or lower case
Vendor specific

 
xml:lang
The optional xml:lang attribute sets the language used in the element, such as English or Greek. For example, in the U.S. the default value is en-US.
 
This example uses a do element inside a deck-level template element to add a "back" hyperlink to each card. In card2, the use of the noop tag inside another do element prevents the display of this back link in that card.
 
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>

 


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information