Java Reference
In-Depth Information
L ISTING 24.4
Continued
<p>
Enter text here:
<input name=”inputBox”/>
</p>
<do type=”accept”>
<go href=”WMLScriptExample.wmls#getString('$(var:inputBox)')”/>
</do>
</card>
<card id=”length” title=”Length Test”>
<p>
Enter text here:
<input name=”inputBox2”/>
</p>
<do type=”accept”>
<go href=”WMLScriptExample.wmls#getLength('$(var:inputBox2)')”/>
</do>
</card>
<card id=”setvar_output” title=”setVar Test”>
<p>
Variable = $txtOutput
</p>
</card>
<card id=”input_output” title=”Output Test”>
<p>
You entered: $txtInput
</p>
</card>
24
<card id=”length_output” title=”Length Test”>
<p>
Length = $strLength
</p>
</card>
</wml>
As you can see, the WML file defines three starter scenarios that each call a WML function.
The WMLScript functions set variables and return focus back to one of the three output cards
for displaying information to the user.
 
Search WWH ::




Custom Search