Public Member Functions | |
| HAW_select ($name, $type=HAW_SELECT_POPUP) | |
| add_option ($label, $value, $is_selected=HAW_NOTSELECTED) | |
| set_voice_text ($text, $audio_src="") | |
| set_voice_help ($text, $audio_src="", $url="") | |
| set_voice_noinput ($text, $audio_src="", $url="") | |
| set_voice_nomatch ($text, $audio_src="", $url="") | |
Examples:
$mySelect = new HAW_select("color");
$mySelect->add_option("Blue", "b");
$mySelect->add_option("Red", "r", HAW_SELECTED);
$mySelect->add_option("Yellow", "y");
| HAW_select::HAW_select | ( | $ | name, | |
| $ | type = HAW_SELECT_POPUP | |||
| ) |
Constructor
| name | Variable in which the information about the selected option is sent to the destination URL. | |
| type | (optional) Type of select area: HAW_SELECT_POPUP: popup the whole selection list (default) HAW_SELECT_SPIN: rotate options on a WAP device screen |
| HAW_select::add_option | ( | $ | label, | |
| $ | value, | |||
| $ | is_selected = HAW_NOTSELECTED | |||
| ) |
Adds one option to a HAW_select object.
| label | Describes the option on the visitor's screen/display. | |
| value | Value (string!) sent in the "name" variable, if this option is selected. | |
| is_selected | (optional) Allowed values are HAW_SELECTED or HAW_NOTSELECTED (default). Note: Setting to "selected" will overwrite previous "selected" options of this HAW_select object. |
| HAW_select::set_voice_text | ( | $ | text, | |
| $ | audio_src = "" | |||
| ) |
Sets text to be spoken by voice browsers.
| text | Some alternative text that replaces the enumeration of select options. | |
| audio_src | Some audio file (e.g. *.wav file) to play (optional). |
| HAW_select::set_voice_help | ( | $ | text, | |
| $ | audio_src = "", |
|||
| $ | url = "" | |||
| ) |
Sets help text for voice browsers.
| text | Some helpful information concerning this select element. | |
| audio_src | Some audio file (e.g. *.wav file) to play (optional). | |
| url | Some other voice deck to go to (optional). |
| HAW_select::set_voice_noinput | ( | $ | text, | |
| $ | audio_src = "", |
|||
| $ | url = "" | |||
| ) |
Sets noinput text for voice browsers.
| text | Some text to inform the user that no input has been received. | |
| audio_src | Some audio file (e.g. *.wav file) to play (optional). | |
| url | Some other voice deck to go to (optional). |
| HAW_select::set_voice_nomatch | ( | $ | text, | |
| $ | audio_src = "", |
|||
| $ | url = "" | |||
| ) |
Sets nomatch text for voice browsers.
| text | Some text to complain that user input was not recognized. | |
| audio_src | Some audio file (e.g. *.wav file) to play (optional). | |
| url | Some other voice deck to go to (optional). |
1.5.1