WMLScript » WMLBrowser » WMLBrowser.prev

Syntax:
WMLBrowser.prev()

Orders the browser to go back to the previous card.

The WMLBrowser.prev function directs the browser to return to the previous card that was on display. To effect this, the WMLScript interpreter returns control to the WML browser and then the previous card is loaded. The empty string "" is returned by this function.

Since calls to the WMLBrowser.go and WMLBrowser.prev functions override each other, only the last call will determine the settings in effect.

In WML, the prev tag performs a similar task.

This function does not take a parameter.

Examples

Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>

<card id="card1">
   <p>
   we start and end here
   </p>
   <do type="accept">
      <go href="#card2" />
   </do>
</card>

<card id="card2">
   <p>
   prev example
   </p>
   <do type="accept">
      <go href="PrevExample.wmls#findprev()" />
   </do>
</card>

</wml>
Explanation:

Code for PrevExample.wml

Language(s): WML
Code:
extern function findprev()
{
   WMLBrowser.prev();
};
Explanation:

Code for PrevExample.wmls

Language(s): WML

See Also: