- field1 - choice text
- field2 - choice value
A second parameter can also be received, which will be a reference to the textbox DOM object.
Example 1: (Get the name/value of selected option by using the selection parameter)
Example 2: (Get the ID of the textbox widget by using the textBox parameter)
Note: If the textbox has the float placeholder property enabled, the DOM structure of the textbox widget is altered, in that the textbox's <input> element is wrapped in a <div> element, which then adopts the widget's id. In this case, the onselect event handler could be written like in Example 3, below.