|
|
||||||||
10 LinksCards without links are dead ends. Without links the cards within a deck cannot be accessed. Links start at an anchor position using the <anchor>….</anchor> tags or more commonly using <a>….</a> for anchor tags. All <a>….</a> tags have a required href attribute. The value of the href attribute is the url of the target. This is where the link points. Only the text (or image) nested within these tags is displayed by the browser. Absolute or relative or card?Links can be absolute or relative, and can point at the top card in a deck (the default value) or target particular cards. If you wish to link to a deck on another server then an absolute link is needed. This contains the full url of the target deck or card. If linking within the same deck then just the card name is required to create a relative link. In a relative link the browser assumes what the rest of the url should be from the current address it is browsing. If the link stays within the same deck then the value of the href attribute is the card's id, preceded by hash #. It is also possible to link to an individual card with an absolute link, by specifying the card name after the full url with the card id precceded by hash #. Whenever possible make your links relative. They are quicker and easier to write, and if you ever need to change server any relative links will not need re-writing.
Index linked.The first wml document in a file has the name index.wml and is known as the index deck. When linking to the index deck then the name of that deck (index.wml) need not be included. By default the browser always accesses the index deck. This is quicker and easier to write and also makes site promotion neater by reducing the length of the url being advertised.
Both links produce the same result. |
1
Preparation Type in WAP
Questions,
comments, Find WAPtutor usefull? |
|||||||