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 |