Page 78 - DCAP512_WAP_AND_WML
P. 78

WAP & WML




                    Notes          </p>
                                   </card>
                                   <card id=”card2" title=”My Second Card”>
                                   <p><a href=”#card1">Back to Card One</a>

                                   </p>
                                   </card>
                                   </wml>
                                   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.




                                      Task  Analyze what are the basic and important tags used in WML for navigation?

                                   6.3.1 WML Links

                                      Links are user-selectable hotspots.
                                      Links offer navigation capabilities.
                                      WML links are equivalent to HTML hyperlinks.

                                      Links are deployed in WML as either the <anchor> tag or the <a> tag.
                                   Link-Anchor Elements
                                      The <a> element

                                           simple hot spot




          72                                LOVELY PROFESSIONAL UNIVERSITY
   73   74   75   76   77   78   79   80   81   82   83