Hello, I have a 2 comboboxes on my web-page. first contains list of
cities, and other contains list of companies. But i need to filter
second combobox by selected city in first combo.
What the best way to implement this.
I know this is not hard task but i don’t what to invent wheel.
Thanks
I made a selection helper… I know, it’s ugly code so the others need
not comment 
In my case it was States and Cities though. If you take some time to
understand the code you’ll be able to use it as well.
Please see the following in order:
1)
2) Parked at Loopia
In the pastie, you’ll see
- state selection box in view → this would be your “city”
- encodeURI_selection helper → just a helper that it uses
- show_cities.rjs → this would be your “show_companies.rjs” action
- city_select.rhtml → this would be your “company_select.rjs”
Remember – your city is to my state, your company is to my city… so
don’t get confused 
On 10/7/07, Igor K. [email protected] wrote:
Hello, I have a 2 comboboxes on my web-page. first contains list of
cities, and other contains list of companies. But i need to filter
second combobox by selected city in first combo.
What the best way to implement this.
I know this is not hard task but i don’t what to invent wheel.
Thanks
Posted via http://www.ruby-forum.com/.
–
Ramon T.
Thanks Ramon, I’ll check it!