Interacting with a server

If your voice application interacts with another back-end application, you will need to submit data to that back-end application. You may also need to retrieve information in order to perform operations or list choices for a caller. Several elements let you submit information to a server via ECMAScript variables:

Each of these elements has a namelist attribute that specifies the variables to be submitted. If one of the specified variables is set to a complex ECMAScript object, all component values in the object are submitted as separate variables. For example, the following <submit> element submits the psize array:

<script>
  var psize = new Object;
    psize[0] = "personal";
    psize[1] = "small";
    psize[2] = "large";
    psize[2] = "extra-large";
</script>
<submit src="bar.jsp" namelist="psize"/>