i have a regular combobox and i am listening to the change event and sticking the selected value in an html table. this all works fine but there is one issue. Right now, the user can select the same item more than once (which i dont want to allow).
At the point of where an item is selected, i want to:
Capture the value and stick it in the table (which i am doing now and code is below)
<script type="text/javascript"> $(document).ready(function() { $('#categories').change(function() { if (this.selectedIndex != 0) { addRowToTable(this.value); } }); }
And i am trying to figure how to do #2 and #3 below . .
- reset the selectedindex back to 0 (which says "Please select . .")
- Not allow that selection to be selected again (and any visual representation on disabling that dropdown item).