Proceed to WirelessDevNet Home Page
Publications, e-books, and more! Community Tutorials Store Downloads, tools, & Freebies! IT Career Center News Home
newnav.gif

Newsletters
EMail Address:



   Content
  - Articles
  - Columns
  - Training
  - Library
  - Glossary
 
   Career Center
  - Career Center Home
  - View Jobs
  - Post A Job
  - Resumes/CVs
  - Resource Center
 
   Marketplace
  - Marketplace Home
  - Software Products
  - Wireless Market Data
  - Technical Books
 
   News
  - Daily News
  - Submit News
  - Events Calendar
  - Unsubscribe
  - Delivery Options
 
   Community
  - Discussion Boards
  - Mailing List
  - Mailing List Archives
 
   About Us
  - About WirelessDevNet
  - Wireless Source Disks
  - Partners
  - About MindSites Group
  - Advertising Information
 
INDEX
>Introduction
>The WML Deck
>The WMLScript Program
>Debugging The WMLScript
>Lessons Learned
>Conclusion

Writing A Multi-Currency Converter Using WMLScript (cont.)

by Wei Meng LEE

The WML Deck

Let's take a look at the WML deck that loads the application (Currency.wml):

<?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="Currency"> <p> Currency to convert from: <select name="fromCurrency"> <option value="USD">US$$</option> <option value="SIN">S$$</option> <option value="RM">RM</option> </select> Enter Currency: <input type="text" name="amount" format="*N"/> Currency to convert to: <select name="toCurrency"> <option value="USD">US$$</option> <option value="SIN">S$$</option> <option value="RM">RM</option> </select> <do type="accept" label="Calculate"> <go href="Calculate.asp#Convert($(amount))"/> </do> </p> </card> <card id="card2" title="Note"> <p> Please select a different currency. </p> </card> </wml>

There are two cards within the deck. The first card takes care of user input and once the user is done with it, links to the WMLScript:

<go href="Calculate.asp#Convert($(amount))"/>

Notice that I did not link to a WMLScript file with the .wmls file extension. Instead, I have pointed to an ASP file. What I am doing here is to use Microsoft Active Server Pages to dynamically generate the WMLScript program. We will take a closer look at the WMLScript program in the next section.

The amount to be converted is also passed as an input parameter to the function named Convert().

Next: The WMLScript Program

Sponsors

Search

Eliminate irrelevant hits with our industry-specific search engine!









Wireless Developer Network - A MindSites Group Trade Community
Copyright© 2000-2010 MindSites Group / Privacy Policy
Send Comments to:
feedback@wirelessdevnet.com