how to use Ajax

24 views
Skip to first unread message

Fahim Patel

unread,
Sep 25, 2012, 10:07:46 AM9/25/12
to rubyonra...@googlegroups.com
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 ?

Fahim Patel

unread,
Sep 25, 2012, 11:07:30 AM9/25/12
to rubyonra...@googlegroups.com
is any one know this

Hassan Schroeder

unread,
Sep 25, 2012, 11:14:46 AM9/25/12
to rubyonra...@googlegroups.com
On Tue, Sep 25, 2012 at 8:07 AM, Fahim Patel <paf...@gmail.com> wrote:
> is any one know this

Stop. This is basic JavaScript/AJAX stuff, and has little to nothing to
do with Rails.

Find a tutorial on JS/AJAX and learn how it works. Then come back
here if you have a specific problem integrating it with your Rails code.

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Reply all
Reply to author
Forward
0 new messages