Motorola 1 manual Input Element Type Optionlist

Page 32

VoxML 1.0 Element Reference

INPUT Element : Type OPTIONLIST

INPUT Element : Type OPTIONLIST

The OPTIONLIST input is used to specify a list of options from which the user can select. This input type is used in conjunction with the OPTION element, which defines the specific user responses and the behavior associated with each.

Syntax

<INPUT TYPE="OPTIONLIST" [NAME="value"] [TIMEOUT="value"] [NEXT="value" [NEXTMETHOD="value"] ] > OPTION elements </INPUT>

Attributes

Attribute Name

Allowed Values

 

 

NAME

identifier

 

 

NEXT

next step URL

 

 

NEXTMETHOD

GET *

 

POST

 

 

TIMEOUT

milliseconds (integer)

Examples

1 <STEP NAME="init">

2<PROMPT> What would you like to drink? </PROMPT>

3<INPUT TYPE="optionlist">

4<OPTION NEXT="#coke"> coke </OPTION>

5<OPTION NEXT="#coke"> coca-cola </OPTION>

6<OPTION NEXT="#pepsi"> pepsi </OPTION>

7<OPTION NEXT="#rc"> r c </OPTION

8</INPUT>

9</STEP>

In this simple example, the VoxML voice browser will go to a different STEP depending on which cola the user selects. As defined on lines 4 and 5, if the user said “coke” or “coca-cola”, the voice browser would go to the STEP named “coke”.

October 1998

VoxML 1.0 Language Reference 28

Image 32
Contents VoxML Language Reference RevisionPage Contents Appendices Purpose of this Document What is VoxMLOverview Structure of a VoxML Document DIALOGs and STEPsBasic Elements Other Reference Documentation VoxML 1.0 Application Development GuideAttributes ACK ElementSyntax Examples Audio Element Break Element Cancel Element Next step URLExamples Case Element Class Element IntegerExamples Dialog Element EMP Element Error Element Input TYPE=OPTIONLIST Help Element Option NEXT=#end done /OPTION 11 /INPUT 12 /STEP Input Element Input Element Type Date Data FormatInput Element Type Digits Input Element Type Grammar Input Element Type Hidden Input Element Type Money Input Element Type None Input Element Type Number Input Element Type Optionlist Input Element Type Phone Input Element Type PROFILE‡ Input Element Type Record Prompt Input Element Type Time Input Element Type Yorn Option Element VoxML 1.0 Element Reference Options Element Or Element Syntax AttributesPrompt Element Pros Element Rename Element Response Element Examples Step Element Switch Element Value Element PromptAppendices Appendix a VoxML 1.0 Document Type DefinitionOctober VoxML 1.0 Language Reference Appendix B Vcard Profile Names and Subtypes Vcard Profile Names and SubtypesFirst