On 7/25/06, Ben Johnson <bjohnson@mediamanifest.com>
wrote:>
> 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.
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060725/8af83c7f/attachment.html