11.4. Going Backwards

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


Previous Page Page 20 of 50 Next Page


Feedback Form (ExpandCollapse)

What do you think about this web page?






(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.