> You shouldn't. By changing the value of a <select> input, it changes
what
> is
> selected. Does it not work for you?
>
Since when? This hasn't worked in any browser I've ever tried, but
maybe something has changed since I tried it. It would be nice to add a
Form.Element.setValue function to prototype that will just select the
matching option if it's a select box, but as of yet, I didn't see one in
there. You need something like:
var input = $('id');
for (var i=0; i<input.options.length; i++) {
if (input.options[i].value == yourValue) {
input.options[i].selected = true;
break;
}
}
Greg
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs