I have a .vxml file that submits to an ASP page. Within that ASP page, I'm trying to grab the variable passed in the namelist. When I just pass a name:value pair in my address bar, my asp page picks it up and displays the appropriate vxml response.
Here's my .vxml file.
<?xml version="1.0"?>
<vxml version="2.0">
<form id="counselor">
<field name="id">
<grammar
type="application/x-regexp">[0-9]{10}</grammar>
<prompt>
Enter the ten digit VAP Office number.
</prompt>
<filled>
You entered <value expr="id"/>.
<submit next="counselorwrite.asp"
namelist="id"/>
</filled>
</field>
</form>
</vxml>
And here's my asp page that can't seem to pick up the namelist.
<?xml version="1.0"?>
<vxml version="2.0">
<%@ Language=VBScript %>
<%
Dim intVAPOfficeNo
intVAPOfficeNo=Request("id")
Response.Write intVAPOfficeNo
Response.ContentType = "text/xml"
%>
<form id="counselor">
<block>
<audio>
Counselor is <%= intVAPOfficeNo %>
</audio>
<exit/>
</block>
</form>
</vxml>
Thanks
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Problems picking up namelist variable in ASP
Updated asp page
I have made some necessary changes to the asp page, but it still doesn't work.
Instead of
intVAPOfficeNo=Request("id"),
I have
intVAPOfficeNo=Request.Form("id").
I also took out the <audio> tags so it now actuallys speaks "Counselor is" before it hangs up.
Instead of
intVAPOfficeNo=Request("id"),
I have
intVAPOfficeNo=Request.Form("id").
I also took out the <audio> tags so it now actuallys speaks "Counselor is" before it hangs up.
IVR code from counselorwrite.asp slightly modified
Hello,
It appears as though you have some very minor errors in your ASP page. Here is your IVR code from counselorwrite.asp slightly modified.
The main difference between this IVR code and your original IVR code is that you do not want to do a response.write before the <form>. Doing so will result in invalid VXML. You instead only want to print the value of intVAPOfficeNo within the block. Hope This Helps!
It appears as though you have some very minor errors in your ASP page. Here is your IVR code from counselorwrite.asp slightly modified.
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<%@ Language=VBScript %>
<%
Dim intVAPOfficeNo
intVAPOfficeNo=Request("id")
Response.ContentType = "text/xml"
%>
<form id="counselor">
<block>
Counselor is <%= intVAPOfficeNo %>
<exit/>
</block>
</form>
</vxml>
Last edited by support on Thu Feb 25, 2010 5:20 pm, edited 3 times in total.