June 9, 2000 - WML's Events
June 9, 2000|
Tips: June 2000
Yehuda Shiran, Ph.D.
<onevent>tag. The following example uses one of the supported events, the
onenterforwardevent. 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
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,
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.