User Tools

Site Tools


Sidebar

en:objects:listbox

listbox

Object for managing selection elements (listboxes and combo boxes) on the current page (SELECT tag)



Example
<select name="select" id="123" size="" ><:select>

Description
the SELECT Tag allows you to create an interface element in the form of a drop-down list, as well as a list with one or multiple selections, as shown below. The final appearance depends on using the size attribute of the select tag, which sets the height of the list. The width of the list is determined by the widest text specified in the option tag, and can also be changed using styles. Each item is created using the option tag, which must be nested in the select container. If you plan to send list data to the server, you need to place the select element inside the form. This is also necessary when the list data is accessed via scripts.

Learn more about the SELECT tag (source)



basic functionality
Select an option
Select multiple options
Get the selected option
Get information about options
Change options




Select the option

select_index_by_number – select an option by its index in the ListBox with the specified number
select_index_by_name – select an option by its index in the ListBox with the specified name
select_index_by_attribute – choose the option by its index in the ListBox with the specified value of the attribute

select_text_by_number – select an option by its text in the ListBox with the specified number
select_text_by_name – select an option by its text in the ListBox with the specified name
select_text_by_attribute – select an option by its text in the ListBox with the specified attribute value

select_value_by_number – select an option by its value in the ListBox with the specified number
select_value_by_name – select an option by its value in the ListBox with the specified name
select_value_by_attribute – choose the option according to its value in the ListBox with the specified value of the attribute

select_index_by_attribute_by_form_number – select an option by its index in the ListBox with the specified value of the attribute in the form with the given number
select_index_by_attribute_by_form_name – select an option by its index in the ListBox with the specified attribute value and in the form with the specified name

select_text_by_attribute_by_form_number – select an option by its text in the ListBox with the specified attribute value and in the form with the specified number
select_text_by_attribute_by_form_name – select an option by its text in the ListBox with the specified value of the attribute in the form with the specified name

select_value_by_attribute_by_form_number – select the option according to its value in the ListBox with the specified value of the attribute in the form with the given number
select_value_by_attribute_by_form_name – select the option according to its value in the ListBox with the specified value of the attribute in the form with the specified name

select_random_by_number – choose a random option in the ListBox with the specified number
select_random_by_name – select a random option in the ListBox with the specified name
select_random_by_attribute – select a random option in the ListBox with the specified attribute value



Select multiple options

multi_select_indexes_by_number – select options by their indexes in the ListBox with the specified number
multi_select_indexes_by_name – select options by their indexes in the ListBox with the specified name

multi_select_texts_by_number – select options for their texts in the ListBox with the specified number
multi_select_texts_by_name – select options by their texts in the ListBox with the specified name

multi_select_values_by_number – select options for their values in the ListBox with the specified number
multi_select_values_by_name – select options by their values in the ListBox with the specified name



Get the selected option

get_selected_index_by_number – get the index of the selected option in the ListBox with the specified number
get_selected_index_by_name – get the index of the selected option in the ListBox with the specified name
get_selected_index_by_attribute – get the index of the selected option in the ListBox with the specified attribute value

get_selected_text_by_number – get the text of the selected option in the ListBox with the specified number
get_selected_text_by_name – get the text of the selected option in the ListBox with the specified name
get_selected_text_by_attribute – get the text of the selected option in the ListBox with the specified attribute value



Get information about options

get_size_by_number – get the size of the ListBox (number of rows) with the specified number
get_size_by_name – get the size of the ListBox (number of rows) with the specified name
get_size_by_attribute – get the size of the ListBox (number of rows) with the specified attribute value

get_length_by_number – get the length of the ListBox with the specified number
get_length_by_name – get the length of the ListBox with the specified name
get_length_by_attribute – get the length of the ListBox with the specified attribute value

get_type_by_number – get the ListBox type with the specified number
get_type_by_name – get the ListBox type with the specified name
get_type_by_attribute – get the ListBox type with the specified attribute value

get_all_texts_by_number – get the text of all ListBox options with the specified number
get_all_texts_by_name – get the text of all ListBox options with the specified name
get_all_texts_by_attribute – get the text of all ListBox options with the specified attribute value

get_all_values_by_number – get the value of all ListBox options with the specified number
get_all_values_by_name – get the value of all ListBox options with the specified name
get_all_values_by_attribute – get the value of all ListBox options with the specified attribute value



Change options

add_option_by_number – add an option to the ListBox with the specified number
add_option_by_name – add an option to the ListBox with the specified name

en/objects/listbox.txt · Last modified: 2026/08/05 22:29 (external edit)