Won Contests Let Us Talk Mail Me Light of Knowledge


W ML - Wireless Markup Language
  
 Building Mobile Applications using WAP & Wireless Programming

Cards and Decks - creating individual pages and groups of pages

     In HTML, a single file (myPage.html) will generally correspond to just one viewable page. In WML, however, a single file (myPage.wml) can hold the details of more than one page.

     WML makes use of the metaphor of playing-cards to describe this relationship. Each viewable page specified in a WML document is termed a 'card'. And all cards specified in the same WML document are part of the same 'deck'.

     The details describing a single card are placed between <card> </card> tags. Cards should be given an identifying name, and can also be given a title. These details are placed within the initial <card> tag like this:

<card id="myid" title="myTitle">

     The identifier attribute is used to distinguish this card from any others in the deck. The title attribute is used by some microbrowsers (as the browsers embedded in mobile phones are called) as a heading for the card.

     The following script illustrates the specification for a card named 'card1'. Note that indentation in the script can be used to make it more readable; whitespace in WML documents should be ignored by microbrowsers.

 
 Creating links within Cards
The code below shows 2 cards within a deck , in other words 2 display areas within a page ...........
<?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" title="Welcome">
	<p> This is Card1<br/>
		<a href="#card2" title="Card2">Card 2</a>
	</p>
</card>

<card id="card2" title="Card 2">
	<p> This is card2  <br/>
		<a href="#card1">Card 1</a><br/> 
	</p>
</card>

</wml>
 Running the code
1) save the above file as cards.wml in E:\wml\ Directory
2) Open UPSDK Browser, which will be a shortcut created during installation
3) Type in the URL file://e:/wml/cards.wml next to GO Button Text Box, Hit Enter ..........
4) Always remember whenever u make changes to the wml script, u must click on Edit Clear Cache to View New Screen and Re-Enter URL
 What Next ? Content formatting using tables
 Reach me!
   My Web URL : http://www.geocities.com/james_smith73
   If you like this article and/or code mailme or Join our small Group of Java Programmers ,
Till we meet next time BYE     

  Java, J2EE, J2SE and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the United States and other countries.