The Internet Encyclopedia (Volume 3)

(coco) #1

P1: IML


Cassel WL040/Bidgoli-Vol III-Ch-65 September 15, 2003 8:52 Char Count= 0


812 WIRELESSAPPLICATIONPROTOCOL(WAP)

Figure 9: A table of values.

restraint in displaying tables. Figure 10 displays the table
obtained by replacing 1, 2, and 3 by labels. This small
amount of information has consumed nearly all of the
display space. This browser has chosen to wrap the text
of column 1 entries. The browser will choose how to align
and divide the table entries to fit the screen as well as
possible. A developer should not invest a lot of time in
fine tuning the display appearance. It will vary from one
device to another.

User Input
User input is a challenge in the handheld wireless device
world. There is no mouse and no full keyboard. Text in-
put is awkward and slow. The easiest type of input for
the user is selection from a list of options. The devices
will all have some arrows for scrolling through lists and a
numeric keypad for entering a number choice. There are
occasions, however, when user input of text is necessary
to provide a full-featured application. Whenever text in-
put is required, the application should make the task as
easy as possible for the user by allowing short inputs and
using numbers wherever possible.
Input is accepted into a document by use of the
<input>element. The syntax follows:
Introductory text

<input name = "variablename" size = "size"
title = "label" format = "mask"
maxlength = "numberchar"
emptyok = "true|false" />

Figure 10: Table with label.

The introductory text describes what the application
is expecting from this input. Size is the amount of space
provided for this input field. Title is a label for this text.
Format is the mask that will determine what is legal in-
put from the user. If user input does not conform to the
format specified, the input will be rejected. Maxlength is
the maximum length of the text to be received from the
user. The following code displays a box, accepts up to five
characters from the user, makes the first character upper
case and the others lower case, and will accept only letters
or symbols.

<input name = "username" size = "5"
title = "myname" format = "Aaaaa"
maxlength = "7" emptyok = "false"/>

Legal entries for the mask include

Afor any symbol or upper case letter, but no numbers;
afor any symbol or lower case letter, but no numbers;
Nfor a numeric character, but no letters or symbols;
Xfor a symbol, number, or upper case letter;
xfor a symbol, number, or lower case letter;
Mfor a symbol, number, or upper case letter, changeable
to lower case, defaults to upper case for the first letter;
and
mfor a symbol, number, or lower case letter, changeable
to upper case, defaults to lower case for the first letter.
Free download pdf