Passing and Storing Rate Information

To make this application more robust, we have elected to store the rate information as a browser variable. This application variable will be stored on the user's own WAP browser for later recall. Later, we will examine how this is done in the process.wmls walk-through, but this is the reason why we have created the call to the WMLScript. The most important thing to note here is that we are passing the value of text field below.

        <do type="accept" label="Rate">
        <go href="process.wmls#setRate($newRate)"/>
    </do>

After we have set up the soft keys to pass the information to process.wmls, we need to create a way for the user to enter data into the text field. The text field, shown in Figure 15.2, will establish the variable we will pass to process.wmls. In our case, this will be the newRate information.

    <p>
    <b>$$1 USD = </b><br/>
    <input type="text" name="newRate"/>
    </p>

</card>

Figure 15.2. The setrate card contains an input field that passes data to a WMLScript file which is stored for later to actually calculate the currency conversion.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.32.86