Displaying Dropdown list value on selection of other dropdown list

Hi all,

I want to do like following,

I have Zone dropdown list, which contain West Zone, South Zone etc.
when i select a value from this, i want to display all the regions in
the selected zone in Region dropdown.

What I have done is something like this, but it is not working good
for me

<select id="zone_id" name= "zone[id]" onchange="<%=
remote_function(:url => { :action => :showR }) %>">

   <!-- <select id="zone_id" name= "zone[id]" onclick="" >-->
      <% @r= Zone.find_by_sql("select id,ZONE_ZoneName from zones")%>
<% for item in @r %>
<option value= "<%= item.id %>"><b><%= item.ZONE_ZoneName -%></b></

<% end %>

This calling the controller but the selected parameters are not pass
to the controller

I am doing this way.

Is there any other way to do this?
please help me, I am new to ROR

Thanks and Regards,

Hope this helps....



hi Kiran,

Thanks for ur reply
I have used what u have mentioned, but it is not solving my problem
do u have any other solution abt this.
What I have done for this is, i used observer_field it is working fine
in firefox but not working in IE do u have any solution

Thanks and regards

This railscast episode might help you. It does exactly what you're
asking for.