
|
 |

Page navigation
reactions
When a person enters a page, you can
control what they see. This is particularly useful if you want the page to be
different when someone returns to a page they have just left. The tags used
are <onenterforward> and <onenterbackward> which are
used to differentiate between entering a page for the first time, and
returning to it.
An example follows...
<?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="MainCard"
title="This is a first card" onenterbackward="#returncard">
<timer value="50"/>
<p align="center">
Hi, you have never been to this page
<br/>
<a href="#card2">Go to page
two</a>
</p>
</card>
<card id="card2" title="This is the
second card">
<p align="center">
This is the second card
<do type="accept"
label="back">
<prev/>
</do>
</p>
</card>
<card id="returncard" title="This is
the second card">
<p align="center">
You returned to the first page, but this is displayed
instead !
</p>
</card>
</wml> |
|

|