On 27 Feb 2008, at 12:09, Brian wrote:
>
> I am trying to understand the best way to apply javascript to two
> select boxes. If the user changes the selection in box A, a given
> option in box B would dynamically become selected.
>
> Does rails provide help with tasks like this, or would I need to
> manually create a javascript function to handle this kind of thing in
> the view?
Whatever you do boils down to writing an onchange handler for A. You
can do this in a railsish way: you can use the update page to let you
write that bit of javascript using rjs, but I would contend that there
isn''t a huge amount of point doing it that way. With a smattering of
prototype, javascript really isn''t that bad.
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---