Page 135 - DCAP512_WAP_AND_WML
P. 135

Unit 9: Working with user Input




          URL. Since a URL can only contain a limited number of characters, the GET method has the  Notes
          disadvantage that there is a size limit for the data to be sent. If the user data contains non-ASCII
          characters, you should make use of the POST method to avoid encoding problems.
          The href attribute of the <go> tag specifies the URL to submit the form data to. In the above WML
          example, we instruct the WAP browser to submit the form data to “processing.asp” for processing
          when the “Submit Data” anchor link is selected.
          Four <postfield/> tags has been enclosed in the <go></go> tags in the above WML example.
          The <postfield/> tag is used to specify the name-value pairs to be submitted to the server.
          The <postfield/> tag has two attributes, name and value. As their names suggest, the name
          attribute specifies the name of the parameter to be sent and the value attribute specifies  the
          value of the parameter.




             Notes  Notice the difference between HTML and WML here. In HTML, the name attribute
             of the <input> and <select> tags is used to specify the name of the parameter to be sent,
             while in WML the name attribute of the <postfield> tag is used to do the same thing. In
             WML,  the name  attribute of <input> and <select> is used to specify the name of the
             variable for storing the form data.
          At the beginning of the above WML document, a value is assigned to the my_temp_id variable.
          When the “Submit Data” anchor link is clicked, it is sent to the server as part of the form. We use
          it to simulate the function of a hidden field in HTML.

          Self Assessment

          Fill in the blanks:

          14.  To submit data to the server in WML, you need the ……………………. and <postfield/> tags.
          15.  The <postfield/> tag is used to specify the ……………………. pairs to be submitted to the
               server.


             

             Caselet     WAP Still Finding its Feet in India

                      IRELESS application protocol (WAP), the new age technology that provides
                      instant connectivity, anytime, anywhere, may not take off in India for at least
             Wanother year, according to experts.

             “WAP in India is still at a nascent stage and it will  take at least a year or two for the
             technology to become effectively operational here,” Mr. R. Trivedi, Partner, Ernst and
             Young, said.
             There are various constraints that will hamper widespread use of this service, the first
             being the cost of WAP-enabled handsets.

             Most WAP-enabled mobile phones cost more than   20,000. A Nokia 7110, for instance,
             costs   23,299 and an Ericsson R320 is priced at   31,995. According to analysts, unless prices
             come down to around   10,000, WAP will be an expensive proposition.
                                                                                 Contd...




                                           LOVELY PROFESSIONAL UNIVERSITY                                   129
   130   131   132   133   134   135   136   137   138   139   140