Namespace BTM.Form.Select
Form Select element functionality
Defined in: form.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
BTM.Form.Select.addOption(element, text, value, defaultSelected, selected)
Add a new Option to a Select element
|
| <static> |
BTM.Form.Select.copyAllOptions(element, destination, autoSort)
Copy all Options from one Select element to another
|
| <static> |
BTM.Form.Select.copySelectedOptions(element, destination, autoSort)
Copy the selected Options from one Select element to another
|
| <static> |
BTM.Form.Select.moveAllOptions(element, destination, autoSort)
Move all Options from one Select element to another
|
| <static> |
BTM.Form.Select.moveSelectedOptions(element, destination, autoSort)
Move the selected Options from one Select element to another
|
| <static> |
BTM.Form.Select.removeAllOptions(element)
Remove all Options from a Select element
|
| <static> |
BTM.Form.Select.removeSelectedOptions(element)
Remove the selected Options from a Select element
|
| <static> |
BTM.Form.Select.selectAll(element)
Select all Options in a Select element
|
| <static> |
BTM.Form.Select.sort(element)
Sort Options in a Select element
|
Method Detail
<static>
{HTMLElement}
BTM.Form.Select.addOption(element, text, value, defaultSelected, selected)
Add a new Option to a Select element
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to add the Option to
- {String|Object} text
- the display text for the new Option, or an object with text and value properties
- {String} value Optional
- the value attribute for the new Option (ignored if text is an Object with text and value properties
- defaultSelected
- selected
- Returns:
- {HTMLElement} the original element
<static>
{HTMLElement}
BTM.Form.Select.copyAllOptions(element, destination, autoSort)
Copy all Options from one Select element to another
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to copy the Options from
- {HTMLElement|String} destination
- element ID or element reference to copy the Options to
- {Boolean} autoSort Optional, Default: true
- flag to automatically sort the Options in the destination Select element
- Returns:
- {HTMLElement} the original (source) element
<static>
{HTMLElement}
BTM.Form.Select.copySelectedOptions(element, destination, autoSort)
Copy the selected Options from one Select element to another
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to copy the Options from
- {HTMLElement|String} destination
- element ID or element reference to copy the Options to
- {Boolean} autoSort Optional, Default: true
- flag to automatically sort the Options in the destination Select element
- Returns:
- {HTMLElement} the original (source) element
<static>
{HTMLElement}
BTM.Form.Select.moveAllOptions(element, destination, autoSort)
Move all Options from one Select element to another
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to copy the Options from
- {HTMLElement|String} destination
- element ID or element reference to copy the Options to
- {Boolean} autoSort Optional, Default: true
- flag to automatically sort the Options in the destination Select element
- Returns:
- {HTMLElement} the original (source) element
<static>
{HTMLElement}
BTM.Form.Select.moveSelectedOptions(element, destination, autoSort)
Move the selected Options from one Select element to another
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to move the Option from
- {HTMLElement|String} destination
- element ID or element reference to move the Option to
- {Boolean} autoSort Optional, Default: true
- flag to automatically sort the Options in the destination Select element
- Returns:
- {HTMLElement} the original (source) element
<static>
{HTMLElement}
BTM.Form.Select.removeAllOptions(element)
Remove all Options from a Select element
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to remmove the Options from
- Returns:
- {HTMLElement} the original (source) element
<static>
{HTMLElement}
BTM.Form.Select.removeSelectedOptions(element)
Remove the selected Options from a Select element
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to remmove the Options from
- Returns:
- {HTMLElement} the original (source) element
<static>
{HTMLElement}
BTM.Form.Select.selectAll(element)
Select all Options in a Select element
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to copy/move the Option from
- Returns:
- {HTMLElement} the original element
<static>
{HTMLElement}
BTM.Form.Select.sort(element)
Sort Options in a Select element
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to sort the Options of
- Returns:
- {HTMLElement} the original element