VoiceXML Forum Community Message Board


Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» VoiceXML Forum Community Message Board   » Newbies   » Variables

 - UBBFriend: Email this page to someone!    
Author Topic: Variables
tojo933
Junior Member
Member # 3691

Icon 1 posted August 05, 2006 07:19 PM      Profile for tojo933     Send New Private Message       Edit/Delete Post   Reply With Quote 
This script is meant to assign a variable (a) using menu script and then pass that var and login info using form id="login>. It does not pass (a) correctly. Am I missing something?

code:
 
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<property name="inputmodes" value="dtmf"/>
<var name = "a" />
<menu id="menu1" dtmf="true">
<prompt> Press 1 to xxxx. Press 2 to xxxxx. Press 3 to xxx.</prompt>
<choice next="#choice1">1</choice>
<choice next="#choice2">2</choice>
<choice next="#choice3">3</choice>
</menu>
<form id="choice2">
<assign expr = "3" name = "a" />
<block><goto next="#login"/></block>
</form>
<form id="choice3">
<assign expr = "4" name = "a" />
<block><goto next="#login"/></block>
</form>
<form id="login">
<field name="id" type="number">
<prompt>Please enter your user eye dee followed by the pound key</prompt>
</field>
<field name="pin" type="digits?minlength=7;maxlength=7">
<prompt>Please enter your pin</prompt>
<filled>
<submit next="http://www.tojo931.com/gmaps/voicexml.php" namelist="id pin a"/>
</filled>
</field>
</form>
</vxml>


Posts: 3 | Registered: Aug 2006  |  IP: Logged
mheadd
Member
Member # 3181

Member Rated:
4
Icon 1 posted August 06, 2006 09:41 PM      Profile for mheadd   Author's Homepage   Email mheadd   Send New Private Message       Edit/Delete Post   Reply With Quote 
Yes. You must assign a value to "a" within the <block> tags. Since <assign> is not a legal child of the form tag, the assignment is not happening properly.

Depending on the tool/environment that you are using, you can usually validate your code before running to make sure its correct.

You should also check the platform logs -- this script should throw an "error.semantic" that you should be able to see fairly easily.

Hope this helps.

--------------------
Mark
VoiceinGov.org
http://www.voiceingov.org

Posts: 45 | Registered: Jun 2005  |  IP: Logged


All times are Eastern  
Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | VoiceXML Forum



Powered by Infopop Corporation
UBB.classicTM 6.3.1.2