For 7th Sem | WAP Program List.................
WAP program.............
WAP program.............
1)
Write a WML
script to print “Hello World”.
<?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="First WML Example">
<p>Hello, World!</p>
</card>
</wml>
2) Write a WML script to create a table.
<?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="Basket">
<p align="center">
<table columns="6"
align="LRCRCR">
<tr>
<td>floppy
drive</td>
<td>1</td>
<td>@</td>
<td>$$29.95</td>
<td>=</td>
<td>$$29.95</td>
</tr>
<tr>
<td>floppy
disk</td>
<td>10</td>
<td>@</td>
<td>$$0.75</td>
<td>=</td>
<td>$$7.50</td>
</tr>
<tr>
<td>TOTAL</td>
<td/><td/><td/>
<td>=</td>
<td><b>$$37.45</b></td>
</tr>
</table>
</p>
</card>
</wml>
3) Write a WML script that uses timer.
<?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="Welcome"
ontimer="#main">
<!-- Timer waits 100 tenths of a
second. -->
<timer value="100"/>
<p><img
src="speedtest.jpg"/></p>
<do
type="accept"><go href="#main"/></do>
</card>
<card title="Main"
id="main">
<p>Welcome to the main
page!</p>
</card>
</wml>
4) write WML script to check
whether entered date is valid or naot.
<struts-config>
<plug-in
className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/config/validator-rules.xml,/WEB-INF/config/validation.xml"
/>
</plug-in>
</struts-config>
<form-validation>
<global
/>
<formset> <field
property="datumIngediend" depends="required, date">
<arg0 key="aanvraagForm.datumingediend.toonnaam"/>
<var>
<var-name>Pattern</var-name>
<var-value>dd-MM-yyyy</var-value>
</var> </field> </field>
</formset>
</form-validation>
5) Write WML Program to trigger ontimer event.
<? xml version=”1.0”?> <! DOCTYPE wml PUBLIC
“-//WAPFORUM//DTD WML 1.3//EN” http://www.wapforum.org/DTD/wml13.dtd”>
<wml>
<card id=”card1” title=”Card
1”>
<onevent
type=”ontimer”> <go href=”#card2”/> </onevent>
<timer
value=”50”/>
<p align=”center”> Timer Example First Card </p>
</card>
<card id=”card2” title=”Card 2”>
<p align=”center”>
<big> Welcome to
Second Card </big>
</p>
</card>
</wml>
No comments:
Post a Comment