Executes actions conditionally.
<if
cond="js_expression"
>
Executable Content
</if>
| Attribute | Description |
cond |
JavaScript expression that evaluates to a boolean value that must be |
|
|||
|
| | VoiceXML 2.0 Specification: <if> |
| | Related tags: <else>, <elseif> |
<?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="form">
<field name="hello">
<grammar type="application/x-nuance-gsl">
[one dtmf-1 goodbye]
</grammar>
<prompt>Say one or press one to continue or say goodbye to exit.</prompt>
<nomatch>Sorry, I did not get it.<reprompt/></nomatch>
<filled>
<if cond="hello=='one' || hello=='dtmf-1'">
<prompt> Welcome to this part of the world. </prompt>
<else/>
<prompt> Sorry you could not have much fun. Goodbye </prompt>
</if>
</filled>
</field>
</form>
</vxml>
| Café Home |
Developer Agreement |
Privacy Policy |
Site Map |
Terms & Conditions Part No. 520-0001-02 | © 1999-2007, BeVocal, Inc. All rights reserved | 1.877.33.VOCAL |