Dependent drop downs

I asked about this before but perhaps didn’t state clearly what it was
I wanted.
I have a select box and based on the user’s choice a second select
would be populated that relates to the choice made in the first box.
I’ve googled around and found little on dependent drop downs for
rails. Kind of surprises me since I’d think it would be a more
common function. Can anyone point me in the direction ?

TIA
Stuart

Just search back on this forum, there have been about 4 or 5 posts and
replies about this in in the past couple of weeks. I posted one of the
replies so its deffinitely there.
regards
c

Alright, I found the thread. It probably makes sense for me at this
point to get familiar with Ajax, rjs and all in Rails, before
attempting.

Stuart

On 07 Sep 2006, at 15:16, Dark A. wrote:

As I’m reading through the AJAX stuff (in AWDWR) I’m wondering about a
few things
If I have this one element in my form where when user picks option
from another element is loaded - is this more of a javascript coding ,
like “onclick” or something that could be done with what’s available
within Rails.
One idea is I’m having is to have that section of my form as a partial
that will get triggered in the controller to update. This make sense
?

It’s quite easy do that with the prototype helpers. Just use an
observe of some element that calls a method in your controller, which
in its turn will update a div on your page with a partial. Or you
could look at the UJS plugin, I found it most useful as your view is
a lot cleaner than when using the built-in methods.

Best regards

Peter De Berdt

As I’m reading through the AJAX stuff (in AWDWR) I’m wondering about a
few things
If I have this one element in my form where when user picks option
from another element is loaded - is this more of a javascript coding ,
like “onclick” or something that could be done with what’s available
within Rails.
One idea is I’m having is to have that section of my form as a partial
that will get triggered in the controller to update. This make sense
?

Stuart