example using <parameter> to to pass data to a subdial
Posted: Tue Sep 02, 2003 11:25 am
When using <param> to pass a value to a subdialog, you must redeclare the variable name in the subdialog script you are using. Example:
Calling Page:
Subdialog Page:
Notice that in the subdialog page it is we redeclare the variables parm1 and parm2. Using undeclared variables in vxml throw an error.semantic event.
Calling Page:
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<var name="local_parm1" expr="'A B C D'"/>
<var name="local_parm2" expr="'1 2 3 4'"/>
<form>
<subdialog src="subdialog.vxml">
<param name="parm1" expr="local_parm1"/>
<param name="parm2" expr="local_parm2"/>
</subdialog>
</form>
</vxml>
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form id="subdialog1">
<var name="parm1"/>
<var name="parm2"/>
<block>
parm 1 is <value expr="parm1"/>.
parm 2 is <value expr="parm2"/>
<return/>
</block>
</form>
</vxml>