getSelectedOptions() |
It gets all the selected options for the select and list controls
Syntax
Script |
optionsCollection = ControlID. getSelectedOptions() |
Parameters
Parameter |
Description |
---|---|
optionCollection |
Denotes the options selected in the Select and List controls |
Remarks
The optionsCollection contains option objects. The following table lists the properties of an option object.
value |
A string that is not available to the user. It is taken internally for transaction. |
description |
String that is available to the user |
If the description property is not provided for the option object, then the value property is taken as its description.
To create an option object which has its value property set to IND and the description property set to India, the code will be:
var optionObject = {value:"IND", description:"India" }
This following code demonstrates how the method can be used:
var optionsCollection = SelectBoxID.getSelectedOptions();