Page 131 - DCAP512_WAP_AND_WML
P. 131

Unit 9: Working with user Input




          <wml>                                                                                 Notes
          <card title=”Fieldset”>
          <p>
          <fieldset title=”CD Info”>

          Title: <input name=”title” type=”text”/><br/>
          Prize: <input name=”prize” type=”text”/>
          </fieldset>
          </p>

          </card>
          </wml>
          Input Fields
          A WML card can be set up to let a user enter information, as demonstrated in this example:


                 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>

          Tables

          A WML card can be set up to display the table 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=”Table”>

          <p>
          <table columns=”3">



                                           LOVELY PROFESSIONAL UNIVERSITY                                   125
   126   127   128   129   130   131   132   133   134   135   136