setXMLAutoLoading and loadOpenStates trying to get cookie wo

I have gotten a bit further on this, but now it only opens one folder and not all of the folders I had open. Here is my code:



tree=new dhtmlXTreeObject(“treeboxbox_tree”,“100%”,“100%”,0);

tree.setXMLAutoLoading("/core/xmlTree.php");



tree.loadXML("/core/xmlTree.php?id=1",function(){

tree.loadOpenStates(“sd”);

});

tree.attachEvent(“onOpenEnd”,function(){

tree.saveOpenStates(“sd”);

});



tree.setImagePath("/core/dhx/tree/codebase/imgs/csh_vista/");



Please provide with working code if possible.

The problem is that loadOpenStates generate onOpenEnd events, and after first opened folder, saveOpenStates command will reset list of items and as result opening process will stop.

With latest version of dhtmlxtree, the next code is possible.

tree.attachEvent(“onAllOpenDynamic”,function(){
tree.attachEvent(“onOpenEnd”,function(){
tree.saveOpenStates(“sd”);
});
});
tree.loadXML("/core/xmlTree.php?id=1",function(){
tree.loadOpenStates(“sd”);
});

If you are using older version of dhtmlxtree, which doesn’t support onAllOpenDynamic event - please contact us directly at support@dhtmlx.com - we will provide updated codebase.

Working sample sent by email.

I have not gotten the email with the working example.  Please advise.

If you still have not receive a sample, please contact us directly at support@dhtmlx.com