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 ?
on 2012-09-24 14:02
on 2012-09-24 14:05
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.
on 2012-09-24 14:05
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.
on 2012-09-24 14:13
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.
on 2012-09-25 16:08
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 ?
on 2012-09-25 16:15
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.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.