Google Answers Logo
View Question
 
Q: Help with WMLScript ( No Answer,   0 Comments )
Question  
Subject: Help with WMLScript
Category: Computers > Wireless and Mobile
Asked by: googolo-ga
List Price: $25.00
Posted: 31 Jan 2005 23:55 PST
Expires: 02 Mar 2005 23:55 PST
Question ID: 466818
Need answer why my wmlscript is not working. I have made it really
simple and it still doesn't work. simple1.wml has 2 cards. Card 1 asks
user to enter a 4 digit number. GO executes function in simple1.wmls
to check length, then returns to Card 2 in simple1.wml to display
number or ERROR. Files below.

I have configured the webserver with the correct content type mappings:
.wml   text/vnd.wap.wml
.wmls  text/vnd.wap.wmlscript

I have tried on both real phones and with WAP phone emulators
(Wapalizer, WapTiger, etc.). All display the first card of simple1.wml
OK. But when I enter a number and press GO, I get "Services: Reply
unknown" on the phone. Wapalizer gives me the underlying error, which
is HTTP Error 406.

You can access the files hosted at the following URL:
http://ww2.xilo.com/mpos/simple1.wml

WML file (simple1.wml):
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>

<card id="card1" title="Card 1">
<do type="accept" label="GO">
  <go href="simple1.wmls#checknumber($(mynumber))"/>
</do>
<p>
Any 4 digit number: 
<br/>
<input type="text" name="mynumber"/>
</p>
</card>

<card id="card2" title="Card 2">
<p>
Your number: $(mynumber)
</p>
</card>
</wml>

WMLScript file (simple1.wmls):
extern function checknumber(mynumber) {
  if (String.length(mynumber) != 4) {
    WMLBrowser.setVar("mynumber", "ERROR");
  }
  WMLBrowser.go("simple1.wml#card2");
}
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy