Board Logo

persistant state of tree menu instance
PinkFloydEchoes - 12/12/2003 at 06:43 PM

I have a tree menu that is 3 levels deep.
I click on a level 1 node and expand to see all level 2 nodes under that node. Then I click on a level 2 node to see the leaf nodes under that node.

Then I refresh the page and all the level 1 nodes are collapsed, but if I click on the same level 1 node, the level 2 node i chose previously is already expanded and the leaf nodes that belong to it are already displayed.

How can I set my tree menu up so that on a page refresh every node and sub node in the tree is collapsed?

do I have to write a beforeInit function?

rock - 12/15/2003 at 09:25 AM

If you are not using 'st' parameter in the item's scope settings than tree control by default uses its open/close state stored in the cookies. To disable state to be restored from cookies you could call o_mytree.reset_state() in the beforeInit function.

Back to forum: