combobox.js
Creates a combobox, an enhanced <select> which allows richer options.
Objects
OAT.Combobox(defaultValue)
Creates a combobox with a value of defaultValue. Its main div is accessible as OAT.Combobox::div. Onchange callback may be set via OAT.Combobox::onchange property.
Methods
OAT.Combobox::addOption(element, textValue)
Adds a new option, represented by element with a value of textValue.
CSS classes
.combo_box
CSS class of the main combo box div.
.combo_box_list
CSS class of options list div.
.combo_box_value
CSS class of the currently selected option.
.combo_image
CSS class of the dropdown clicker image.
Example
var cb = new OAT.Combobox("[choose here]"); document.body.appendChild( cb.div ); cb.addOption(someElement, "option 1"); cb.addOption(someOtherElement, "option 2");
Referenced by...