11. WML Anchor Links
Anchor links enable the navigation between different WML cards. If you select an anchor link, you will be brought to another WML card in the current deck or in another deck.
The <anchor></anchor> tag pair is used to create an anchor link. It is used together with tags such as <go/> and <prev/>, which tell WAP browsers what to do when a user selects the anchor link. <go/> and <prev/> should be enclosed within the <anchor></anchor> tags, like this:
<anchor>
<go
href="..." ... />
</anchor>
<anchor>
<prev/>
</anchor>
Like HTML, WML uses a URL (Uniform Resource Locator) to refer to the location of a WML file or a card in a deck. The href attribute of the <go/> tag is used to specify the URL. Both absolute and relative URLs are accepted. URLs in WML have the same form as those in HTML. Here is the general form of an absolute URL in WML:
http://host_name/path/file_name#offset?parameter1=value1¶meter2=value2...
The protocol used in WML URLs is HTTP. The reason is that WAP gateways request WML files from ordinary web servers using the HTTP protocol, although wireless devices communicate with WAP gateways using WAP protocols.
Previous Page | Page 16 of 50 | Next Page |
- 1. WML (Wireless Markup Language) Introduction
- 2. WML Deck and Card
- 3. WML Document Structure
- 4. WML Generic Metadata: <meta>
- 5. Comments in WML
- 6. Line Breaking in WML
- 7. Font Size and Style in WML
- 8. WML Preformatted Text: <pre>
- 9. WML Images
- 10. WML Tables
- 11. WML Anchor Links
- 12. Programming Softkeys of Mobile Phones and the <do> Element
- 13. WML Template and Menu
- 14. WML Events and the <onevent> Tag
- 15. Timer and the ontimer Event
- 16. WML Event: onenterbackward
- 17. WML Event: onenterforward
- 18. WML Selection Lists and the onpick Event
- 19. WML Input Fields
- 20. WML Variables
- 21. Submitting Form Data to the Server in WML
- 22. Clearing a Saved Form in WML