Program Study of WML Events, Tasks, Input and Variable Elements
Code:
/*Program Study of WML Events, Tasks, Input and Variable Elements*/
<?xml version = "1.0"?>
<!DOCTYPE wml PUBLIC "-//OPENWAVE.COM//DTD WML 1.3//EN"
"http://www.openwave.com/dtd/wml13.dtd" >
<wml>
<card id = "stock">
<do type="accept" label="Next">
<spawn href="#order">
<catch>
<receive name="status" />
</catch>
<receive name="status"/>
</spawn>
</do>
<p>
Stock Trade Example<br />
$(status)
</p>
</card>
<card id = "order">
<do type ="accept" label="Order">
<spawn href="#confirm" onexit="?">
<receive name="status" />
</spawn>
</do>
<do type ="options" label="Prev">
<exit>
<send value="Status: No trade"/>
</exit>
</do>
<p>
Stock Order: <br />
Stock : PHCM <br />
Shares : 100 <br />
</p>
</card>
<card id="confirm">
<do type="accept" label="Yes">
<exit>
<send value="Status: Completed"/>
</exit>
</do>
<do type="options" label="Cancel">
<throw name="onerror">
<send value="Status: Cancelled" />
</throw>
</do>
<p align="center">
<b> *** Confirm***<br />
Stock Order <br />
</b>
</p>
</card>
</wml>
Sample Output:<?xml version = "1.0"?>
<!DOCTYPE wml PUBLIC "-//OPENWAVE.COM//DTD WML 1.3//EN"
"http://www.openwave.com/dtd/wml13.dtd" >
<wml>
<card id = "stock">
<do type="accept" label="Next">
<spawn href="#order">
<catch>
<receive name="status" />
</catch>
<receive name="status"/>
</spawn>
</do>
<p>
Stock Trade Example<br />
$(status)
</p>
</card>
<card id = "order">
<do type ="accept" label="Order">
<spawn href="#confirm" onexit="?">
<receive name="status" />
</spawn>
</do>
<do type ="options" label="Prev">
<exit>
<send value="Status: No trade"/>
</exit>
</do>
<p>
Stock Order: <br />
Stock : PHCM <br />
Shares : 100 <br />
</p>
</card>
<card id="confirm">
<do type="accept" label="Yes">
<exit>
<send value="Status: Completed"/>
</exit>
</do>
<do type="options" label="Cancel">
<throw name="onerror">
<send value="Status: Cancelled" />
</throw>
</do>
<p align="center">
<b> *** Confirm***<br />
Stock Order <br />
</b>
</p>
</card>
</wml>
Comment bellow for Query and Feedback :)
0 comments:
Confused? Feel free to ask
Post a Comment