(VoiceXML 2.1 feature) Iterates through the given ECMAScript array and repeats the enclosed content.
Note 1: <foreach> will not create its own scope; all ECMAScript operation within the tag will be done in the parent's scope.
Note 2: The <foreach> element operates on a shallow copy of the array specified by the array attribute.
|
|
Attribute |
Description |
|
array |
An ECMAScript expression to be evaluated and used as the array. Required. |
|
item |
An ECMAScript variable that will store the array item upon each iteration of the loop. A new variable will be declared if it is not already defined within the parent's scope. Required. |
array expression does not evaluate to an ECMAScript Array, an error.semantic will be thrown.Block Catch Error Filled ForEach Help If Noinput Nomatch Prompt
Assign Audio Clear Data Disconnect Enumerate Exit ForEach Goto If Log Mark Prompt Reprompt Return Script Submit Throw Value Var Speech Markup (SSML) Tags #PCDATA
None
<foreach> is used as a child of <prompt>, and vxmli.conformance.disallow_exec_content_within_prompts is set to true, it can only contain:<audio><enumerate><foreach><mark><value>
|