Change a <select> value in RJS?

Is it possible to change which value is selected in a select tag using
RJS? If not what would the raw javascript be to do this outside of an
RJS template?

Thanks for your help.

On 7/25/06, Ben J. [email protected] wrote:

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

You just need to set the value
In js (prototype) it would be
$(‘select_id’).value = my_val_thats_in_the_options

So I think you should be able to do
page[‘select_id’].value = my_val_thats_in_the_options

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs