Page 137 - DCAP512_WAP_AND_WML
P. 137

Unit 9: Working with user Input




          9.6 Summary                                                                           Notes

              A variable is a named location in memory where data can be stored. A variable consists of
               a name-value pair. If variable data is not drawn from an earlier card or a database, the
               initial value must be set. This can be done within a card using either  onenterforward or
               ontimer.
              Variables can be used in content, in some attribute values, cannot be used for element or
               attribute names, It can be used to store captured user inputs.

              Variable value is set using <setvar> or control name attribute. When a user switches from
               card to card in a deck, we need to store data in variables. WML variables are case sensitive.
              When someone executes a task (like go, prev, and refresh), the setvar element can be used
               to set a variable with a specified value. Variables can also be set through an input element
               (like input, select, option, etc.).

              Entry fields <input> are used to collect information from the user in the form of text fields.
               The <input> element defines an entry field. Information entered here can be referenced
               within our WML decks or can be passed to our application server.
              A WML card can be set up to display the select and option functions of WML. The <select>
               selection lists gives users a choice of several predetermined answers in the forms of radio
               buttons or check boxes.
              The option element is used with the select element to define the choices available. The
               <option> attributes are onpick, value and title. Onpick is used to specify a URL to open if
               this option is chosen. Title is used to specify a title for the option. Value specifies the value
               for this option, If this option is selected, the value is assigned to the name attribute of the
               select element.
              The optgroup element allows you to group options so they are more manageable. The
               option group contains a list of options that relate to the group. The optgroup element has
               a single attribute called title that determines what is displayed on the device to represent
               the group.
              The fieldset element allows you to group select or input elements within a card to make
               navigation simpler. The fieldset has a title attribute.
              The WAP Toolkit 1.2 product from Nokia contains graphical development environment,
               browsers, and  WML/WMLScript compilers. The Nokia toolkit currently runs only on
               Windows NT 4.0 but the Nokia WAP Toolkit also requires a Java 2 runtime.
              The toolkit application itself supports the creation, modification, and testing of WML/
               WMLScript code within one application. The user can toggle between loading the WAP
               applications through HTTP or via a WAP gateway.
              The Phone.com UP.SDK product has no graphical IDE provided with the product. UP.SDK
               focuses much more heavily  on providing a set  of reusable code libraries for use with
               languages such as WML, Perl, C, C++, and Visual Basic.

              The UP.SDK comes with a WAP browser known as the UP. Simulator. Through Internet
               connection the simulator can dynamically connect to the Phone.com developer Web site
               in order to download samples and access live WAP applications on the Web.

              The UP.SDK also includes Perl and C library functions for generating WML and handling
               HTTP requests  as well  as C++  (Solaris) and  COM (Windows)  objects for notification,
               digest, and fax handling.




                                           LOVELY PROFESSIONAL UNIVERSITY                                   131
   132   133   134   135   136   137   138   139   140   141   142