Motorola 1 manual Input Element Type Number

Page 31

VoxML 1.0 Element Reference

INPUT Element : Type NUMBER

INPUT Element : Type NUMBER

The NUMBER input is used to collect numbers from the user.

Syntax

<INPUT TYPE="NUMBER" NAME="value" NEXT="value" [NEXTMETHOD="value"] [TIMEOUT="value"] />

Attributes

Attribute Name

Allowed Values

 

 

NAME

identifier

 

 

NEXT

next step URL

 

 

NEXTMETHOD

GET *

 

POST

 

 

TIMEOUT

milliseconds (integer)

Examples

1 <STEP NAME="init">

2<PROMPT> Please say your age now. </PROMPT>

3<INPUT TYPE="number" NAME="age" NEXT="#doit"/>

4</STEP>

The code on line 3 illustrates the use of the NUMBER INPUT to collect numbers from the user, store the number in the VoxML variable named “age”, and then go to the STEP named “doit”.

If the user were to say, “eighteen”, in response to the PROMPT shown on line 2, the value “18” would be stored in the VoxML variable “age”. The NUMBER input type will collect numbers like 20 (i.e. twenty), only one number per input. To collect a series of digits like “four five six” (i.e. “456”), use the DIGITS input type.

October 1998

VoxML 1.0 Language Reference 27

Image 31
Contents Revision VoxML Language ReferencePage Contents Appendices Overview What is VoxMLPurpose of this Document DIALOGs and STEPs Structure of a VoxML DocumentBasic Elements VoxML 1.0 Application Development Guide Other Reference DocumentationSyntax ACK ElementAttributes Examples Audio Element Break Element Next step URL Cancel ElementExamples Case Element Integer Class ElementExamples Dialog Element EMP Element Error Element Input TYPE=OPTIONLIST Help Element Option NEXT=#end done /OPTION 11 /INPUT 12 /STEP Input Element Data Format Input Element Type DateInput 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 Syntax Attributes Or ElementPrompt Element Pros Element Rename Element Response Element Examples Step Element Switch Element Prompt Value ElementAppendix a VoxML 1.0 Document Type Definition AppendicesOctober VoxML 1.0 Language Reference Vcard Profile Names and Subtypes Appendix B Vcard Profile Names and SubtypesFirst