Topic: select and expand node by id in ajax tree?

Hi,

is it possible top open an ajax tree and select the node by id?
i've to go direct (url params) to a node an select it.
i'm also using CookieStorage. is it possibile to close the tree before reopen it?

Thanks a lot for your help.

Sascha

Last edited by wojewsky (2010-02-07 18:11:30)

Re: select and expand node by id in ajax tree?

you can select node on tree load:

tree.addEvent('load', function(){
    tree.select(Mif.id('some_id'));
});

what means close tree? close all nodes?

tree.root.recursive(function(){
    this.toggle(false);
});

Re: select and expand node by id in ajax tree?

ok.

thank you. now it works.