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 ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/3iixrYOu9EAJ. For more options, visit https://groups.google.com/groups/opt_out.
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 Mon, Sep 24, 2012 at 5:01 PM, Fahim Patel <pafahim-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > 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 ? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/3iixrYOu9EAJ. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
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 Monday, September 24, 2012 5:01:33 PM UTC+5, Fahim Patel wrote:> > > > 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 ? > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/GSl7RmF-HRsJ. For more options, visit https://groups.google.com/groups/opt_out.
can i get tutorial and help ful links .. I wish use both javascript and Ajax.. On Monday, September 24, 2012 5:31:33 PM UTC+5:30, Fahim Patel wrote:> > > > 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 ? > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/R7KkxHq05ZAJ. For more options, visit https://groups.google.com/groups/opt_out.
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 Monday, September 24, 2012 5:09:53 PM UTC+5, Fahim Patel wrote:> > can i get tutorial and help ful links .. > I wish use both javascript and Ajax.. > > > On Monday, September 24, 2012 5:31:33 PM UTC+5:30, Fahim Patel wrote: >> >> >> >> 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 ? >> >>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/aftTJEdbSjAJ. For more options, visit https://groups.google.com/groups/opt_out.
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 Monday, September 24, 2012 5:31:33 PM UTC+5:30, Fahim Patel wrote:> > > > 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 ? > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/LAs9AGcnuyQJ. For more options, visit https://groups.google.com/groups/opt_out.
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. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.