Page 75 - DCAP512_WAP_AND_WML
P. 75
Unit 6: Card Navigation
6.1 Card Navigation Notes
The element is the simplest way in WML of creating an anchor that links one document to another.
Elements have a number of attributes that can be used to configure and customize their behavior.
Apart from the common attributes xml:lang, id and class, the <a> element supports attributes called
href, title and access key. href is used to specify the destination of a hyperlink. The destination may
be within a deck, or a card in another deck that is also on the same site or the card may be in a deck
which is on another site. For the first case, it is simply a matter of specifying the id of the destination
card as the value of href. For the second one, we have to specify the URL for the deck and the id
attribute of the desired card element within that deck. For the last case, the destination has to be
specified fully with a full URL, the server name, the deck to load and the card within the deck.
The <a> element’s title attribute is used to provide a brief description of the hyperlink. The
accesskey attribute allows the user to select an anchor by pressing a key on the keypad of the
WAP-enabled device. The accesskey attribute’s values are the numbers, which appear on the left
side of the hyperlinks. Pressing those keys will result immediate navigation.
The <anchor> element supports the same attributes with the same semantics as, with the exception
of href. It performs straightforward navigation. This element can be used together with elements
called <go> and <prev> to specify a destination for the hyperlink.
The <go> element is used to specify a navigation action that occurs as a result of an event. The
<go> supports a number of attributes. When used with the <anchor> element to perform simple
navigation, the <go> element has the following general form:
<anchor>
content
<go href=”destination” />
</anchor>
The <anchor> element offers the ability to navigate to the previous card. This is being achieved
by the <prev> element.
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
Attributes:
The <card> element supports the following attributes:
Attribute Value Description
title cdata Gives a title to this card. This title is displayed in some way by
the browser when the card is visible.
newcontext true Specifies that when this card is entered, the browser context
false should be cleared.
ordered true Provides a hint to the browser about how the card is organized. Set it
false 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.
onenterforward URL Occurs when the user navigates into a card using a "go" task
onenterbackward URL Occurs when the user navigates into a card using a "prev" task
ontimer URL Occurs when a "timer" expires
xml:lang language_code Sets the language used in the element.
class cdata Sets a class name for the element.
id element_ID A unique ID for the element.
LOVELY PROFESSIONAL UNIVERSITY 69