<clear>

Clears one or more form-item variables.

Syntax

 <clear
     namelist="variable1 ..."
 />

Description

Attribute Description
namelist

Space-separated list of variables to reset. Optional (default behavior clears all form-item variables in the current form).

This attribute can specify any variable currently in scope, both VoiceXML variables and JavaScript variables, including variables that have not been explicitly declared.

When the interpreter resets a form item, it:

 •  Sets the form-item variable's value to undefined.
 •  Resets the form item's prompt and event counters to 0.

Usage

Parents Children
<bevocal:foreach>
<block>
<catch>
<error>
<filled>
<help>
<if>
<noinput>
<nomatch>

None.

See Also

 •  VoiceXML 2.0 Specification: <clear>
 •  Related tags: <field>, <record>, <subdialog>, <transfer>, <block>, <initial>

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="form1">
     <field name="ssn" type="digits">
       <prompt>
         Please say your S S N number.
       </prompt>
     </field>
     <field name="passcode" type="digits">
       <prompt>
         Please say your passcode number
       </prompt>
     </field>
     <field name="choice" type="boolean">
       <prompt>
         Your S S N is
         <say-as type="number:digits"> <value expr="ssn"/> </say-as>
         and your passcode is 
         <say-as type="number:digits"> <value expr="passcode"/> </say-as>.
         Are the values right ?
       </prompt>
       <filled>
         <if cond="choice">
           <prompt> That is good. </prompt>
         <else/>
           <clear/>
           <prompt>Let's do it again </prompt>
         </if>
       </filled>
     </field>
   </form>
 </vxml>

[Show Frames]   [FIRST] [PREVIOUS] [NEXT]
BeVocal, Inc. 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