Documentation

SelectBox

string
CLanguage::SelectBox(
 string name,
 string value,
 string default_value = "",
 string js_function = "",
 string add_to_select = "class=typeselect"
)

The method returns the HTML code containing the drop-down list of languages (the select tag). Non-static method.

Paramaters

ParameterDescription
name Name of the drop-down list:
<select name="name" ...>
value Current value (to initialize the selected option).
default_value If specified, it will be rendered as the first item in the list (for example: select language).
Optional parameter. Empty by default.
js_function Name of JS function which is to be called upon selecting an item in the drop-down list:
<select OnCha nge="js_function" ...>
Optional parameter. Empty by default.
add_to_select An arbitrary HTML code which is to be added to the select tag:
<select add_to_select ...>
Optional parameter. The standard CSS class is used for the drop-down lists of administrative section by default.

Examples of use

<table>
  <tr>
    <td>Language:</td>
    <td><?=CLanguage::SelectBox("LANGUAGE", LANGUAGE_ID)?></td>
  </tr>
</table>


© «Bitrix24», 2001-2024
Up