O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The <card> Element

As you saw back in Example 1.1, the <card> element encloses a WML card within a deck. In addition, text and graphics enclosed within <p> elements, it may also contain a number of event bindings (see Chapter 3) and a timer (see Chapter 5).

Attributes of the <card> Element

title (variable string; optional)

Gives a title to this card. This title is displayed in some way by the browser when the card is visible.

newcontext (boolean; optional; default false)

Specifies that when this card is entered, the browser context should be cleared: all variable bindings are removed, and the history stack is emptied. This happens before the onenterforward event binding is executed, so new variables may be set up there.

ordered (boolean; optional; default true)

Provides a hint to the browser about how the card is organized. Set it to true if the card consists of a number of separate fields that should be dealt with in the order they appear in the card. Set it to false if the card contains optional fields or may be filled in out of order. At the time of writing, no WAP browsers support the ordered attribute.

onenterforward (variable url; optional), onenterbackward (variable url; optional), ontimer (variable url; optional)

These three attributes exist as a shorthand for including simple <onevent> event bindings inside the <card> element. You can use these when the task to be performed is a simple <go> task. This task (because it’s simplified to just the URL) can’t set any variables ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required