HAW_select Class Reference

List of all members.

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="")

Detailed Description

This class provides a select element in a HAW_form object. It allows to create optimized WML for WAP devices which are capable to interprete the Openwave GUI extensions for WML 1.3. All other WAP devices receive WML 1.1 compatible markup code, which is quite similar to the markup code created by the HAW_radio class.

Examples:

$mySelect = new HAW_select("color");
$mySelect->add_option("Blue", "b");
$mySelect->add_option("Red", "r", HAW_SELECTED);
$mySelect->add_option("Yellow", "y");

See also:
HAW_form


Member Function Documentation

HAW_select::HAW_select ( name,
type = HAW_SELECT_POPUP 
)

Constructor

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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).


The documentation for this class was generated from the following file:
Generated on Mon Dec 6 21:51:55 2010 for HAWHAW PHP by  doxygen 1.5.1