Справочник Пользователя для Nokia SERIES 40

Скачать
Страница из 30
WAP Service Developer's Guide for Nokia Series 40
Version 1.0
Copyright © 2002. Nokia Corporation. All rights reserved.
18
4.4  Links
The anchored link or <a> element specifies a hotlink. Links are underlined and
coloured as blue. When a user selects a link, an associated task is performed. When
the link is active, the options list of the browser display is extended with the option
"Open link". The user can also select a link by pressing the Send key.
The <
a>
 element is a short form of the 
anchor
 element, and is bound to a go task
without variables. In general, it is recommended to use the <
a>
 element instead of
<
anchor>
 where possible, to allow more efficient compression.
A hotlink is automatically followed by a line break. In case a line break is defined
after an <
a>
 element, the line break is ignored. If an empty line is needed between
two links, it is necessary to add two line breaks between the <
a>
 elements. If a
hotlink does not have a title or label, the URL address of the link is displayed in its
full length, and functions as a normal hotlink.
Example 4-4 Image as a link
<anchor>text<go href="#card2"/>
</anchor>
<anchor>
<img alt="part cldy" src="file://…/partcldy.wbmp"/>
<go href="#card2"/>
</anchor>
4.5  Do element
The 
do
 element provides a general mechanism for the user to act upon the current
card. The 
do
 elements are mapped behind the browsers options list together with
the preloaded options. If a 
do
 element contains a 
prev
 task, the right soft key is
labelled "Back" and the options list is extended with "Back". Use of a 
prev
 task is
highly recommended in every card because it enables backward navigation. Do
elements have a label that is the text of the item in the browser’s options list. If the
label is available it is used as an option list item. If there is no label, a default text is
displayed, according to Table 4-1 below. However, it is highly recommended to use
the 
label
 
attribute.
Type
Static text
Accept
OK
Prev
Back
Help
Help
Reset
Reset
Options
Options
Delete
Delete
Unknown
Unknown
Table 4-1 Do elements label default text