Invokes another dialog as a subdialog of the current one. The subdialog is a reusable dialog that allows values to be returned. The subdialog executes in a new execution context with all variables and execution state initialized. Values can be passed into the subdialog using <param> child elements; the subdialog must contain <var> variable declaration for each parameter. The original dialog can continue execution only when the subdialog executes the <return> element. Returned values are available as properties of the <subdialog> form item variable.
Note: The values passed in and out of a subdialog (using <param> and <return>) can be strings or any ECMAScript values (ex. numbers, pointers, objects, arrays, etc.).
<subdialog
name="string"
expr="ECMAScript_Expression"
cond="ECMAScript_Expression"
src="URI"
srcexpr="ECMAScript_Expression"
namelist="variable1 variable2 ..."
method="get" | "post"
enctype="MIME_type"
fetchaudio="URI"
fetchaudiodelay="time_interval"
fetchaudiominimum="time_interval"
fetchhint="safe"
fetchtimeout="time_interval"
maxage="integer"
maxstale="integer">
child elements
</subdialog>
|
|
Attribute |
Description |
|
name |
The name of this subdialog. This variable can be referenced anywhere within the subdialog's form. The results returned from the subdialog can be retrieved as properties of the subdialog variable: |
|
expr |
An ECMAScript expression to be evaluated and used as the initial value of this subdialog. This subdialog will be visited only if the expression evaluates to |
|
cond |
An ECMAScript expression to be evaluated and used as a boolean condition. This subdialog will be visited only if the expression evaluates to |
|
src |
The URI of the subdialog. This can be the URI of another document, a dialog in the same document, or a dialog in another document. If this attribute is empty (""), the current document will be used. Exactly one of src or srcexpr must be specified. |
|
srcexpr |
An ECMAScript expression to be evaluated and used as the URI of the subdialog. This can be the URI of another document, a dialog in the same document, or a dialog in another document. If this attribute is empty ("") or set to the empty string ("''"), the current document will be used. Exactly one of src or srcexpr must be specified. |
|
namelist |
A space-separated list of variables to submit with the request. Optional. (Defaults to nothing.) |
|
method |
The request method: get or post. Optional. (Defaults to get.) |
|
enctype |
The MIME encoding of the submitted data. The following types are supported:
|
|
fetchaudio |
The URI of audio to play while waiting for the document to be fetched. Optional. Overrides the value of the fetchaudio property. |
|
fetchaudiodelay |
The length of time to wait at the start of the fetch delay before playing Overrides the value of the fetchaudiodelay property. A platform extension. |
|
fetchaudiominimum |
The minimum length of time to play Overrides the value of the fetchaudiominimum property. A platform extension. |
|
fetchhint |
Defines when the subdialog should be fetched. Optional.
Overrides the value of the documentfetchhint property. |
|
fetchtimeout |
The length of time to wait for the subdialog to be fetched before throwing an Overrides the value of the fetchtimeout property. |
|
maxage |
Indicates that this document is willing to use a cached copy of the subdialog only while the age of the cached copy is less than or equal to the number of seconds specified by this attribute. Optional. Overrides the value of the documentmaxage property. |
|
maxstale |
Indicates that this document is willing to use a cached copy of the subdialog that has exceeded its expiration time by as much as the number of seconds specified by this attribute. Optional. Overrides the value of the documentmaxstale property. |
error event may be thrown if a reserved ECMAScript word is used as the name.error.semantic event is thrown if an undeclared variable name is used in the namelist.error.badfetch event is thrown if more or less than one of src and expr are specified.Audio Catch Error Filled Help Noinput Nomatch Param Prompt Property Value #PCDATA
fetchaudiodelay attribute.fetchaudiominimum attribute.namelist, it is recommended that the developer use the toSource() function.namelist.error.badfetch. This limit may be configured by squid (on the platform), or may be overridden by application server configuration.enctype="multipart/form-data", the Content-Type of the submitted data in the request is set to the actual MIME type associated with the audio file format of the recording.enctype="multipart/form-data", the Content-Type of the submitted data in the request is set to "text/plain".
<?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>
|
<?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>
|