<param>
Specifies a parameter in a <subdialog> element.
Syntax
<param
|
|
name="string"
|
|
expr="js_expression"
|
|
value="string"
|
|
valuetype
|
Not implemented
|
type="MIME_type"
|
|
index="integer"
|
|
>
|
|
Nested Param Element
|
|
</param>
|
|
Description
Passes values to subdialogs.
When a <param> element is used to pass a parameter to a subdialog, the subdialog must contain a <var> declaration for the parameter. If the <var> contains an initializing expr attribute, that initializing value is ignored and the value passed with the <param> element is used instead.
| Attribute |
Description |
name
|
Parameter name.
|
expr
|
JavaScript expression that evaluates to the value of this parameter. Optional (as alternative to value).
|
value
|
String to assign as the value of this parameter. Optional (as alternative to expr).
|
valuetype
|
Not implemented.
|
type
|
Type of the value attribute (following Nuance precedent). Optional.
|
index
|
Extension. Index of current <param> element. Optional.
Use when parent <param> element is a vector (java.lang.Vector) or an array.
|
|
|
Tip:
|
| | If a JavaScript expression contains any of the characters "<", ">", or "&", that character must be replaced with the corresponding escape sequence "<", ">", or "&". For more information, see JavaScript Quick Reference. |
|
Usage
See Also
Examples
<?xml version="1.0" ?>
<!DOCTYPE vxml PUBLIC "-//BeVocal Inc//VoiceXML 2.0//EN"
"http://cafe.bevocal.com/libraries/dtd/vxml2-0-bevocal.dtd">
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="main">
<block>We're about to call the sub dialog</block>
<subdialog name="result" src="#subbie">
<param name="hello" value="goodbye"/>
<param name="goodbye" value="goodbye"/>
</subdialog>
<block>
We're back from the sub dialog.
Result dot hello equals <value expr="result.hello"/>
Result dot goodbye equals <value expr="result.goodbye"/>
</block>
</form>
<form id="subbie"> <!-- This is the subdialog -->
<!-- Variables are given values by parameters to the subdialog -->
<var name="hello" expr="'hello'"/> <!-- This initial value is ignored -->
<var name="goodbye"/>
<block>
This is the sub dialog.
hello equals <value expr="hello"/>
goodbye equals <value expr="goodbye"/>
<return namelist="hello goodbye"/>
</block>
</form>
</vxml>
[Show Frames] [FIRST] [PREVIOUS] [NEXT]