spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column61


Introducing WML and WMLScript

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

Operating the Nokia WAP Toolkit

The Nokia WAP Toolkit comes with a few example programs in the Samples directory, under the installation directory. Copy them to your working directory so you can modify them without risking the integrity of the original files. We'll focus in this column on two examples provided by Nokia that include WMLScript code: mortgage, and currency. Let's look first on the currency application and follow its operation, step by step. It provides the user agent with an intuitive, simple-to-use program that convert a given sum from one currency to another. Open the file currency.wml. Your Nokia WAP Toolkit should look like the image shown on the previous page.

The first thing you need to do is to send the application to the user agent (Nokia 6150). WML is a compiled language and so is WMLScript. To compile the WML code, click on the Compile button on the bottom left corner. If you'll look in your working directory, you will see a new file, currency.wmlc (a compiled wml). You should also open the file currency.wmls and compile it, generating the file currency.wmlsc. Return to the main application currency.wml and press the Show button on the bottom left corner. Your Nokia 6150's display should post the currency application's user interface, as shown here:

A few words about the Nokia 6150 is in order. All its buttons are operational including the on/off button. You enter alphanumeric characters via its regular keys. The most important key is the up/down key just underneath the display, in the center of the device. On the up/down key's two sides are two "soft keys". They are called "soft" because their function is software-programmable and shown by the display on its bottom left and right corners. The image above shows that the left soft key has the Options functionality. You'll see below other functions that these soft keys can be assigned.

The Nokia 6150 shows now the currency conversion parameters. Navigate between them using the up/down key. Currently, it reads:

Amount [] from [US DOLLARS] to [Finnish Markka] =

Let's convert 100 French Francs to US Dollars. Navigate to the Amount field with the up/down key. Press the left soft key, labeled Options. You get a new screen, consisting of a menu and two soft keys (Select and Back). The menu includes two entries, Edit Amount and Calculate:

Click on the Select soft key. An entry field will show up. Enter 100.00:

Notice that the name of the entry field, Amount:, is taken from the source code. The 123 icon on the top left corner reminds you that this is a numeric field only. Click the OK soft button. You'll get the following display:

Press the arrow down key to navigate to the next field, the From field:

Click the Options soft key. If you scroll the options with the up and down arrow keys, you will see three options to choose from: Edit From, Calculate, and Help:

Stay on the Edit From option and press the Select soft key. You get the options for the From field. Navigate up and down until you find French Franc:

Press the Select soft key. Notice how the circle to left of your selection gets an inner circle:

Approve your selection by clicking on the OK soft key. Let's navigate now to the To: field. Use the up and down arrow keys to reach the next entry field:

Repeat the sequence above for this field. Change the target currency to US Dollar:

Finally, click the Options soft key and get again the Browser Options:

Navigate to the Calculate option and click the Select soft key. The display will return automatically to a screen labeled "Currency". Navigate to the bottom of the screen and see the result of the computation:

Next: How to program in WML - Part I

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Crucial Triples Up With New Three-Channel DDR3 Kits · Meet the Finalists: Excellence in Technology Awards · Tealeaf Offers Insight to Mobile Customer Behavior


Created: May 8, 2000
Revised: May 8, 2000

URL: http://www.webreference.com/js/column61/3.html