Platform SDK: Web Telephony Engine |
In a WTE application, a check box is useful for presenting a Boolean-type menu that elicits a positive or negative response from the caller. A check box has two possible states—checked or cleared. The checked state is associated with a positive response, and the cleared state is associated with a negative response.
You create a check box by using the INPUT TYPE=checkbox element either inside or outside a FORM element. To introduce the check box to the caller, precede the INPUT element with text or a voice file, include a voice file or cues on the INPUT element itself, or use the LABEL element.
The following example shows a check box that is introduced by a voice file on the preceding P element:
<FORM METHOD=post ACTION=Order.asp ID=OrderForm . . . <P VOICEFILE="waves\Express.wav">Express shipping:</P> <INPUT TYPE="checkbox" NAME="express"> </FORM>
The WTE renders a check box similarly to the way it renders other menus. If the INPUT element has a voice file or any cues associated with it, the WTE plays the voice file and cues and then waits for the caller to respond.
The WTEApplication object has two pairs of properties that specify the ways that the caller can enter a positive or negative response to a check box. The SelectCheckBoxKey property specifies the DTMF key that the caller must press to enter a positive response, and the ClearCheckBoxKey property specifies the DTMF key for entering a negative response.
You can use the %1 and %2 notation in the VOICEFILE attribute and cue properties of a check box to refer to the select and clear keys. For more information, see Using the %1 and %2 Notation.
When SR is enabled, the SelectCheckBoxPhrases property specifies a set of words and phrases that the caller can speak in order to enter a positive response. Similarly, the ClearCheckBoxPhrases property specifies the words and phrases for entering a negative response.