Page 99 - DCAP512_WAP_AND_WML
P. 99

Unit 7: Managing Outputs




          7.1 Basic Card Output                                                                 Notes


          7.1.1 Card Setup

          A WML card can be set up to let a user enter information, as demonstrated in this example:
          <?xml version=”1.0"?>
          <!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.1//EN”

          ”http://www.wapforum.org/DTD/wml_1.1.xml”>
          <wml>
          <card title=”Input”>
          <p>

          Name: <input name=”Name” size=”15"/><br/>
          Age: <input name=”Age” size=”15" format=”*N”/><br/>
          Sex:  <input name=”Sex” size=”15"/></p>
          </card>

          </wml>
          The result MIGHT look like this in your mobile phone display:
                     Top of Form
           ----- Input ----------

            Name:

            Age :
            Sex :

                   Bottom of Form

          Select and Option

          A WML card, can be set up to display the select and option functions of WML:
          <?xml version=”1.0"?>

          <!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.1//EN”
          ”http://www.wapforum.org/DTD/wml_1.1.xml”>
          <wml>
          <card title=”Selectable List 1">
          <p>

          <select>
          <option value=”htm”>HTML Tutorial</option>
          <option value=”xml”>XML Tutorial</option>



                                           LOVELY PROFESSIONAL UNIVERSITY                                   93
   94   95   96   97   98   99   100   101   102   103   104