How to do this?

I wish to select one value from drop down and second drop down should
shows
those values which are related to that selected value
from first drop down.

It should be dynamic ?

Did i have to use Ajax ?

It should be done using javascript. Or if you want to get the values of
second dropdown from server then you have to use AJAX.

It should be done using javascript. Or if you want to get the values of
second dropdown from server then you have to use AJAX.

I don’t have specific tutorials to follow. Google is your best companion
for this purpose. If you can share some of your code then I can help you
to
take a start.

can i get tutorial and help ful links …
I wish use both javascript and Ajax…

I understood the question but I don’t know that why I am unable to
answer
this. I think you should provide me the HTML code which is shown in page
source after the page is loaded. It’s embarrassing for me that I am
unable
to understand the code in your html.erb file.

code :

Area
<%= f.select :area_id, Area.all.collect {|p| [ p.name, p.id ] },
:class=>“small” %>
Milk Mans
<%= f.select :milkman_id, Milkman.all.collect {|p| [ p.name, p.id ] },
:class=>“small” %>

When i select any area then i should see only those milkmans of that
area.
Till now i getting all milkmans in my select box.

How to do this with Ajax ?

Hope u will understand question now ?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs