Dropdown select

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

[email protected] 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.
Thx

You 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

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 ?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs