Going Backwards

Preferences - Do not show ads

The <prev/> tag is used to go backwards through the history stack. Like the <go/> tag, it should be enclosed in the <anchor></anchor> tags. The following WML example illustrates how to go back to a previous card:


(linksEg4.wml)

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">

<wml>
  <card id="card1" title="Card 1">
    <p>
      <anchor>
        <go href="#card2"/>
        Go to card 2
      </anchor>
    </p>
  </card>

  <card id="card2" title="Card 2">
    <p>
      <anchor>
        <prev/>
        Going backwards
      </anchor>

    </p>
  </card>
</wml>


If you view the above WML document in a mobile phone emulator, you should see a card that contains a single anchor link. The result should look similar to the screenshots below:



Sony Ericsson T610


Sony Ericsson T68i


Nokia Mobile Browser 4.0


If you select the "Go to card 2" anchor link, the mobile phone emulator will display the next card in the deck. The result should look like this:



Sony Ericsson T610


Sony Ericsson T68i


Nokia Mobile Browser 4.0


If you select the "Going backwards" anchor link, the previous card, that is card 1, will be displayed.



Sony Ericsson T610


Sony Ericsson T68i


Nokia Mobile Browser 4.0


Page 20 of 50 Previous Page | Next Page
Contents at a Glance
Print this Web Page | | Back to Top

Feedback Form (Expand)

What do you think about this web page?






WML Tutorial Table of Contents WML Tutorial Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page