Ends execution in a subdialog. Returns control and optionally, data, to the caller of the subdialog.
<return
event = "CDATA"
eventexpr = "CDATA"
message = "CDATA"
messageexpr = "CDATA"
namelist = "CDATA"
/>
Attribute |
Data Type |
Required? |
Default |
Description |
event |
CDATA |
no |
NA |
Event to raise returning to the caller. |
eventexpr |
CDATA |
no |
NA |
ECMAScript expression that evaluates to the event to raise. |
message |
CDATA |
no |
NA |
String that provides additional information about the raised event. The message is available as the ECMAScript variable _message in the <catch> element that handles the event. |
messageexpr |
CDATA |
no |
NA |
ECMAScript expression that evaluates to the message. |
namelist |
CDATA |
no |
NA |
Space-separated list of variables to return to the caller. |
<block>, <catch>, <error>, <filled>, <foreach>, <help>, <if>, <noinput>, <nomatch>
None.
<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<var name="defaultName"/>
<form>
<block>
Calling the sub dialog
<assign name="document.defaultName" expr="'Fred'"/>
</block>
<subdialog name="subResult" src="#mySubDialog">
<param name="firstName" expr="document.defaultName"/>
<param name="lastName" value="Smith"/>
</subdialog>
<block>
After the call to the sub dialog the name is
<value expr="subResult.firstName"/>
<value expr="subResult.lastName"/>
</block>
</form>
<form id="mySubDialog">
<var name="firstName" expr="'Billy'"/>
<var name="lastName"/>
<block>
In the sub dialog
<value expr="firstName"/>
<value expr="lastName"/>
<return namelist="firstName lastName"/>
</block>
</form>
</vxml>