I have a act_as_tree model ,I want to show it in several select box,the height of the tree is unknow ,and can be different,how can I do this in AJAX? Just like I select a country in a select box,the coming select box is to select a state,but my case is more complicated. Thx --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
kaiye85-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> I have a act_as_tree model ,I want to show it in several select > box,the height of the tree is unknow ,and can be different,how can I do > this in AJAX? Just like I select a country in a select box,the coming > select box is to select a state,but my case is more complicated. > ThxYou may be able to do some cascading select boxes, but you probably should consider using an autocomplete field instead (depending on your data). See... http://www.sciwerks.com/blog/2006/09/13/cascading-selects-vs-auto_complete/ and http://www.sciwerks.com/blog/2006/07/07/updating-select-controls-with-ajax/ _Kevin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
THX! I read the post of ''Updating ''select'' controls with AJAX'',that''s very helpful.I''ve done this by adding :onChange => "new Ajax.Updater in my view but not krjs,that''s more complicated but it works.now I have an unknow depth of tree of the model .that''s I don''t how many select box should be placed in the view.then how to ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---