WML Scripts | Search |
NowSMS Support Forums ⬆ WAP Technical Discussions (unsupported) ⬆ Archive through December 08, 2004 ⬆ |
◄ ► |
Author | Message | |||
Ashish Chaudhary |
I am trying to write a simple WML Script to do some calculation. When I run my wml file using openwave SDK 6.2, the script does not execute , instead it just shows the content of the wmls file. Here is the code for the wml file: <?xml version=" 1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org//DTD/wml_1.2.xml"> <wml> <card id=add title="Add 2 numbers"> <p> Enter Weight in KG<br/> X=<input name="var1" title="weight" format="*N"/><br/> Enter Height in Meters<br/> Y=<input name="var2" title="height" format="*N"/><br/> <a href="calc.wmls#add($(var1),$(var2))">Calculate</a> </p> <do type="accept"> <go href="calc.wmls#add($(var1), $(var2))"/> </do> </card> <card id="result" title="Result"> <p>X+Y = $(S)<br/></p> </card> </wml> Here is the script: extern function add(A, B) { WMLBrowser.setVar("S", A/B*B); WMLBrowser.go("#result"); } Do I need to add any header information in the script file or is it just as shown above ? |