VoxML 1.0 Element Reference

OPTION Element

OPTION Element

The OPTION element is used to define the application behavior associated with a specific user response.

The OPTION element can exist only within the INPUT element, and then only when using the OPTIONLIST input type.

Syntax

<OPTION [NEXT="value" [NEXTMETHOD="value"] ] [VALUE="value"] > text </OPTION>

Attributes

Attribute Name

Allowed Values

 

 

VALUE

literal value

 

 

NEXT

next step URL

 

 

NEXTMETHOD

GET *

 

POST

Examples

1 <INPUT NAME="choice" TYPE="optionlist">

2<OPTION NEXT="#doit" VALUE="1"> one </OPTION>

3<OPTION NEXT="#doit" VALUE="2"> two </OPTION>

4</INPUT>

The code on lines 2 and 3 illustrate the use of the OPTION element within the INPUT element. In this example, the OPTION on line 2 would be executed when the user responded with “one”, and the OPTION on line 3 would be executed when the user responded with “two”. If the user said “one” the result would be that the value of the variable named “choice” would be “1”, because of the use of the VALUE attribute. Because the NEXT attributes for both of the OPTIONs in this OPTIONLIST are the same, the VoxML voice browser would proceed to the STEP named “doit” when either “one” or “two” was recognized.

October 1998

VoxML 1.0 Language Reference 35

Page 39
Image 39
Motorola 1 manual Option Element