The simplest thing is to inspect the autocomplete widgets available at
script.aculo.us and adapt them for what you need.
I guess you''d have the second dropdown disabled until a company was
selected. So attach an onComplete handler to your first dropdown which
enables and configures the second dropdown to get employees for only the
selected company (or something like that, there are many variations).
I''ve adapted my own version of the script.aculo.us Ajax.Autocompleter
recently, and it is a very good starting point for constructing your
own.
http://demo.script.aculo.us/ajax/autocompleter
Cheers,
Jonathan
-----Original Message-----
From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of Bruce Balmer
Sent: Thursday, 1 December 2005 7:55 a.m.
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: Re: [Rails] Ajaxing two drop down lists
Hi:
I am re-posting this. Not only would the answer be useful to me, but
surely to a lot of other people also. As I say, I don''t need an
answer but I would like to know where to look for an answer. Trawling
has not yet brought me satisfaction.
thanks in advance,
bruce
On 29-Nov-05, at 1:04 PM, Bruce Balmer wrote:
> Hi:
>
> I would like to have one drop down list control another so that if
> list one were companies and the second were employees, then once a
> selection was made in the companies drop down list, only employees
> of that company would show up in the second list. Pretty standard
> stuff and a good use of Ajax (I assume).
>
> I''m not asking for an answer (unless you''d truly like to
give me an
> answer) but where is the best place I can look for the clearest
> explanation of how that can be done?
>
> Thanks in advance,
>
> bruce
>
>