Dependent Selects in prototype
I have two <select>s with the same <option>s, and I need - using prototype - that when selecting an option in one of them, the same option is removed from the other select and additionally the latter must mantain its previously selected option.
Any clues ? Is there a better way than remembering the last item selected, recreate the options array, an reselecting the item ?
You can 'remove' the item from the other select, but you need to specify it by its index, and you'll still need to remember the selected item, and recalculate its index after the removal. So it's slightly better than recreating the array, but not much better.