The <return> element completes execution of <subdialog> and returns control and data to the calling dialog.
Note: The values returned from a <subdialog> can be any ECMAScript values (ex. strings, numbers, pointers, objects, arrays, etc.).
<return
event="event"
eventexpr="ECMAScript_Expression"
namelist="variable1 variable2 ..."
message="string"
messageexpr="ECMAScript_Expression"/>
|
|
Attribute |
Description |
|
event |
The name of an event to be returned to the calling dialog and thrown. Exactly one of event, eventexpr, or namelist may be specified. |
|
eventexpr |
An ECMAScript expression to be evaluated and used as the name of an event to be returned to the calling dialog and thrown. Exactly one of event, eventexpr, or namelist may be specified. |
|
namelist |
A space-separated list of variables to be returned to the calling dialog. Exactly one of event, eventexpr, or namelist may be specified. (Defaults to no variables.) |
|
message |
A message string providing additional context about the event being thrown. The message will be available as a variable within the scope of the |
|
messageexpr |
An ECMAScript expression to be evaluated and used as the message string, as documented under |
Block Catch Error Filled ForEach Help If Noinput Nomatch
None
None
<return> cannot be used as a child of <foreach> when <foreach> is a child of <prompt> and vxmli.conformance.disallow_exec_content_within_prompts is set to true.Document that calls the subdialog:
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form>
<subdialog name="result" src="subdialog.vxml">
<filled>
Your account number is <value expr="result.acctnum"/>.
Your phone number is <value expr="result.acctphone"/>.
</filled>
</subdialog>
</form>
</vxml>
|
Document containing the subdialog:
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form>
<field name="acctnum" type="digits">
<prompt> What is your account number? </prompt>
</field>
<field name="acctphone" type="phone">
<prompt> What is your home telephone number? </prompt>
<filled>
<return namelist="acctnum acctphone"/>
</filled>
</field>
</form>
</vxml>
|