spacer
Yehuda Shiran June 9, 2000
WML's Events
Tips: June 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Going Native With Chrome
Mozilla Fixes Firefox Flaws as 3.5 Release Nears
Microsoft and Novell Still Bosom Buddies

WML supports the <onevent> tag. The following example uses one of the supported events, the onenterforward event. This event occurs when the script enters the card in which this tag resides. In this particular case, it is a help card. Here is the code:

<card id="card1_help" title="Help">
  <onevent type="onenterforward">
	<go href="currency.wmls#getInfoDate('date')"/>
  </onevent>
  <p>
  The currency rates were obtained from the Federal
  Reserve Bank of New York on $(date).
  <do type="prev" label="Back">
	<prev/>
  </do>
  </p>
</card>

We see here the tag, which calls the WMLScript function getInfodate(). This function loads the date variable with the date in the past on which the currency rates were obtained. It is invoked inside an onevent tag, with the event being entering the card, onenterforward.

The card itself includes two items. First is a free-text message, "The currency rates...." The second important item is the Back soft key. It is important to provide users with the key to go back from this Help card.

Learn more about WML and how to execute WML decks in Column 61, Introducing WML and WMLScript.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
XML and PHP Simplified · Creating a ASP.NET Contact Form · Data Filtering with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Intel to Host Live Nehalem Q&A · 12 Tips to Troubleshoot Network File-Sharing · 10 Tips for Selling on Kijiji