WML is a markup language used for displaying pages on mobile devices. It uses decks and cards, where a deck contains one or more cards and the user moves between cards. Key features of WML include support for text, images, user input, navigation between cards, and optimization for narrowband networks. It supports common elements like anchors, inputs, selections, and timers to refresh or navigate pages.
4. WAP CLIENT APPLICATION SERVER WML File Request WML File Received WML Script File Request WML Script File Received WML File Request received WML File Sent WML Script File Req received WML Script File sent Through the Gateway Through the Gateway Through the Gateway Through the Gateway WML Script WML script is a lightweight procedural scripting language, which is based on ECMAScript, the standardized version of JavaScript
5.
6. <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> First Example : <wml> <card id="First_Card"> <do type="accept" label="Next"> <go href="#Second_Card"/> </do> <p> Select <b>Next</b> to display the next card. </p> </card> <card id="Second_Card"> <p> This card contains the following:... </p> </card> </wml> The first two lines define the document prologue that identifies the XML subset. The Next line defines the header of the WML deck. This line of the deck specifies the header of the first card. This line defines an action, which specifies what the user agent should do when the user presses a specified function key. This line specifies the action related to the specified key. Next Back
7.
8. In the following example, the onenterbackward event causes the user agent to navigate to card2 when the user enters this card using a prev task or navigating backwards in the history stack. This means that card2 is displayed to the user instead of card1. Note that if the user navigates forward to this card by using the go task, for example, card1 is displayed. <card id="card1"> <onevent type="onenterbackward"> <go href="#card2"/> </onevent> <p> Hello World! </p> </card> <card id="card2"> <p> You came back!</p> </card> The following example posts three name values to the web server, letting you send data back from the client . HTTP POST method is used to send the data. <go method="post" href="http://hostname/servlet/bank"> <postfield name="money" value="100"/> <postfield name="account" value="12345"/> <postfield name="operation" value="deposit"/> </go>