
|
 |

Using WML Cards

In a web site, when you click on a hyperlink, it traditionally loads a new
page from the web site. As WAP phones can only load pages quite slowly, and
the actual connection to the WAP site to request the page typically takes half
the download time, wml allows you to load several WAP pages in one go. Each
page is stored as a "card" and can be navigated between, just like
normal WAP pages, except that as they are already loaded into the phone, they
appear instantly to the user. You create a card using the <card
id="" title=""> tag, and navigate between the cards
using hyperlinks or buttons, but with a # before
the name, so to navigate to a card called "cardtwo" your hyperlink
will need to ask for "#cardtwo"
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 the first
page"
<p align="center">
Hi, this is card one in a multi card wml 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
<br/>
<a href="#card3">Go to page three</a>
</p>
</card>
<card id="card3" title="This is the third
card">
<p align="center">
Here is the third page in the multi card wml page
</p>
</card>
</wml>
|

|