Hi , i have two drop down list where the data of it retrieve from the DB table. this one is working 100% . bt now i want do some thin like this. when the fist drop down list is selected the second one values should be change according to that. * for example when the county is been selected according to that country the States drop down list must be change. If some one knows how to do this pls reply. Thanks Nadeesha -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can use an AJAX request to go to another page that will give you back some options for that other select box using an RJS request: other_page.rjs page.replace_html "other_select_box", options_for_select(@options) On Jan 8, 2008 2:27 PM, Nadeesha Meththananda < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Hi , > > i have two drop down list where the data of it retrieve from the DB > table. this one is working 100% . > > bt now i want do some thin like this. > when the fist drop down list is selected the second one values should be > change according to that. > > * for example when the county is been selected according to that > country the States drop down list must be change. > > > If some one knows how to do this pls reply. > > > Thanks > Nadeesha > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> You can use an AJAX request to go to another page that will give you > back > some options for that other select box using an RJS request: > > other_page.rjs > page.replace_html "other_select_box", options_for_select(@options) > > On Jan 8, 2008 2:27 PM, Nadeesha Meththananda < > rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> >> Posted via http://www.ruby-forum.com/. >> >> > >> > > > -- > Ryan Bigg > http://www.frozenplague.net > Feel free to add me to MSN and/or GTalk as this email.Hi Ryan Thanks for the tips. bt i have little problem. bz still i did not able to figer out how this AJAX things works.(I am new to this ROR :) ) . so could be give some example or some more guide line for this. (Sorry to trouble u PAL). If ok pls send ur GTalk ID Thanks Nadeesha (neranjan125-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---