<?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="options" label="abc"> <go href="abc.wml"/> </do> </template> <card id="index" title="My WAP Site" newcontext="true"> <p>information</p> <a href="links.wml">My Links</a> <a href="#mon">Monday</a> </card> <card id="mon" title="Monday"> <do type="accept" label="Tues"> <go href="#tue"/> </do> <p>Monday information</p> </card> <card id="tue" title="Tuesday"> <do type="accept" label="Wed"> <go href="#wed"/> </do> <p>Tuesday information</p> </card> </wml> <p align="center"> <p align="right"> <br/> <img src="logo.wbmp" alt="Logo" /> The <head> element specifies information about the deck as a whole, including metadata and access control information. All WML decks are private by default you must explicitly define a deck as public for cards or decks outside your domain to access it. The <template> element defines deck-level event bindings, i.e. characteristics that apply to all cards in the deck. You can override these characteristics for a particular card by specifying the same event bindings within the <card> element. <card id="name"> <do type="type" label="label"> <go href="url"/> </do> <p> text </p> </card> id - Specifies a name that lets you navigate to the card from other cards in the same deck. <do> - Defines the action the phone will perform when the user presses the function key specified by the type attribute. The label attribute specifies a label to display for the function key. If you do not specify this option, the device uses a default label. <go> - Defines the specific task to perform within the <do> action, in this case a <go> task that requests a particular URL. text - Specifies the formatted text displayed on the phone. As described above, the <do> element lets you associate an action (for example, going to a particular URL) with a mechanism for invoking it (for example, pressing the ACCEPT or OPTIONS function key). You can define multiple <do> statements for a card, each of which assigns a task to a specific key or user interface mechanism. In some cases, you may want to assign the same task to a particular key for every card in a deck. One way to accomplish this is to specify identical <do> statements within each <card> statement. As shown in the following example, a more efficient way is to use the <template> element to define behavior that applies to the entire deck. As a thumb rule, a WBMP should not be wider than 96 pixels and higher than 48 pixels (at 72 dots per inch). <input name="variable" title="label" format="specifier" maxlength="n" emptyok="boolean"/> Component Description text The prompt the phone displays to the user. name Required. The name of the variable in which to store the text entry. title A brief label for the input item (applicable for style="SET" only). format A character format specifier for the user entry (see Specifying Text Entry Formats). If you omit this attribute, the UP.Browser lets the user enter characters of any type. maxlength The maximum number of characters the user can enter. If you omit this attribute, the UP.Browser imposes a limit of 256 characters. emptyok Indicates whether or not the field is optional (default is FALSE). The device always uses the format specifier defined for the field (see above) if the user does enter a value. The format attribute allows you to specify the type and case of characters the user can enter. You can use a combination of the following special tags: Tag Description A Any symbolic or uppercase alphabetic character (no numbers) a Any symbolic or lowercase alphabetic character (no numbers) N Any numeric character (no symbols or alphabetic characters) X Any symbolic, numeric, or uppercase alphabetic character (not changeable to lowercase) x Any symbolic, numeric, or lowercase alphabetic character (not changeable to uppercase) M Any symbolic, numeric, or uppercase alphabetic character (changeable to lowercase)--for multiple character input, defaults to uppercase first character m Any symbolic, numeric, or lowercase alphabetic character (changeable to uppercase)--for multiple character input, defaults to lowercase first character For example, specifying format="NAAA" requires the user to enter a number followed by exactly three symbols or uppercase alphabetic characters. In contrast, specifying a single digit number before the character tag limits the number of characters that users can enter without requiring a set number. For example, specifying format="N3A" requires the user to enter a number followed by zero to three symbols or uppercase alphabetic characters. To let users enter an unlimited number of characters of a particular type, specify an asterisk (*) before the character tag. For example, specifying format="NN*M" requires the user to enter two numbers followed by any number of symbols, numbers, or alphabetic characters. The M and m format tags set the default capitalization when you precede them with a number or asterisk. The M specifier makes the first letter the user enters uppercase by default; the m specifier makes it lowercase by default. The user can override the default capitalization in both cases. Social Security Number: <input name="ssnum" format="NNN\-NN\-NNNN"/> The <select> element causes the device to prompt the user to choose one or more items from a specified list. The following is a simplified synopsis of the <select> element: text <select title="label" name="variable" ivalue="default"> <option value="value">content</option> <option value="value">content</option> ... </select> text The prompt the phone displays to the user. title A brief label for the select item. name The name of the variable in which to store the user selection(s). ivalue The default item(s) selected if the name variable has no current value. <option> An individual choice item where content specifies the label for the item and, optionally, an <onevent> statement that associates a task with the item (see Specifying a Task for a Selection Item). The value attribute specifies the value the device adds to the name variable if the user selects that item. The <setvar> element lets you pass a variable when you execute a <go>, <prev>, or <refresh> task. You must specify one <setvar> element for each variable you want to set. The <setvar> element has the following form: <setvar name="name" value="value"/> <p align="alignment" mode="wrapmode"/> align Specifies line alignment (either left, right, or center). If you do not specify a value, left alignment is used by default. mode Specifies the text wrapping mode to use (either wrap or nowrap). The initial setting is wrap mode (see below).