The Wireless Application Protocol
by Steve Mann


Listing One
<wml>
  <card id="card1" >
  <p>
    Hello WAP World.
  </p>
  </card>
</wml>


Listing Two
<card>
  <onevent  type="onenterforward">
    <refresh>
      <setvar name="var1" value="Hello " />
      <setvar name="var2" value="World." />
    </refresh>
  </onevent>
  <p>
    $(var1) $(var2)
  </p>
</card>


Listing Three 
<card>
  <do type="accept">
    <go href="./nextdeck.wml" />
  </do>
  <p>
    Press Go to get a new deck.
  </p>
</card>


Listing Four 
<card>
  <p>
    <anchor>
      Press Go to get a new deck.
      <go href="nextdeck.wml" />
    </anchor>
  </p>
</card>


Listing Five
<card>
  <do type="accept" label="Go" >
    <go href="$(url)" method="post" >
      <postfield name="var" value="$(value)" />
    </go>
  </do>
  <p>
    Enter a URL:<br/>
    <input name="url" value="nextdeck.wml" /><br/>
    Enter some data:<br/>
    <input name="value" />
  </p>
</card>


Listing Six
extern function hello () {
  Dialogs.alert ( "Hello WMLScript World." );
}


Listing Seven
<card id="hello">
  <onevent type="onenterforward">
    <go href="hellowmls.wmls#hello()" />
  </onevent>
</card>


2


