[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Introduction to HDML Structure and Syntax
Section 11 out of 35 total sections , Section 5 out of 10 sections in this chapter


Actions

HDML allows you to define actions, which associate a phone function key with a task, such as downloading and displaying a specified card or deck, or dialing a phone number.

If you do not define an action for a key, the phone executes the key's default task when the user presses it. The following table lists supported function keys and their default tasks:

Key  Default task 

ACCEPT 

Display the previous card 

HELP 

Display a built-in card containing a message that no help is available for the current location. 

PREV 

Display the previous card or cancel the activity if there is no previous card 

SOFT1-SOFT2 

Do nothing 

SEND 

Do nothing 

DELETE 

In a text entry card, delete the character to the left of the cursor. In other cards, do nothing. 



Destinations

Destinations are URLs that specify digests, decks, and cards to download and display on the phone. Destinations are similar to conventional World Wide Web URLs, with several extensions:



A simple example

The following HDML deck contains two cards, which specify actions. The action in the first card instructs the phone to display the second card when the user presses ACCEPT; the action in the second card instructs the phone to request the URL http://devgate2.uplanet.com/ when the user presses ACCEPT.

FIGURE  1-3.     Cards that specify actions



Action scope and precedence

You can define actions at both the deck and the card level. The scope of an action defined at the deck level is the entire deck. The scope of an action defined at the card level is the current card only. Actions defined at the card level take precedence over actions defined at the deck level.

For example, the following deck defines actions at both the deck and the card level.

If the user presses SOFT1 while the phone is displaying card1, the phone goes to cardC. However, if the user presses ACCEPT, the phone goes to cardB--that is, it executes the ACCEPT action defined by the Display card and ignores the ACCEPT action defined by the deck.


[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Introduction to HDML Structure and Syntax
Section 11 out of 35 total sections , Section 5 out of 10 sections in this chapter


Copyright © 1999, Unwired Planet, Inc. All rights reserved.