do or anchor ?

Creating user buttons and links

The previous file example used two <do> buttons: prev and accept. Others available for general use are help and options. Reset and delete should only be used for resetting a form or deleting an entry.

The availability of only four general types of <do> button causes a problem that can be hard to detect in your WML pages. Although the XML will be well-formed with more than one of any type of <do> button, many browsers and toolkits will ignore the duplicated code. Also, the manner in which the button is presented to the visitor will vary greatly between phones. For this reason, use the <do> tag only for the Back button, accept (equivalent to Submit) or reset on forms, help as appropriate and options.

If you have a series of links to show, e.g. an index or contents card, use the <anchor> tag or the inline <a> tag. This ensures that each phone will display the options in a consistent manner.

Even the idea of a button is stretching the concept a little too far. In reality, a <do> tag adds a further option to the WAP browser menu bar. It may not appear as a 3D button on your PC but the functionality is similar - the user needs to move through the options to the one required and select the option from the list. Input controls in forms will add options to this menu and will use the title attribute to tell the user what the option is intended to achieve. Again, different phones will present a different menu, some will automatically add the prefix "Edit" to text input control options. This can cause problems with your cards. It is essential that you check your site with as many phones and/or toolkits as possible

The use of the title attribute is not widespread in HTML and only Internet Explorer supports titles for almost every HTML element. In HTML, these titles are displayed in the same way as the alt text on images, providing a little extra help when the mouse hovers over the element. In WML, the title attribute is essential as it is the only way of identifying the intended function during entry of data. The title of the card is displayed in a similar way to the <title> tag in HTML. The title of each input control is displayed as the user enters data into the phone. Due to the small screen size, this entry process replaces the original card so it is vital that your title attribute is accurate and helpful.

This is part of Copyright © 1998-2004 Neil Williams
See the file about.html for copying conditions.