I want to save and load the NodeState in Cookie, but it does not work
my code:
hilfe_tree=new dhtmlXTreeObject(“inhalt_treemenu”,“100%”,"",0);
hilfe_tree.setImagePath("…/script/treetool/imgs/");
hilfe_tree.setDragBehavior(“complex”);
hilfe_tree.enableDragAndDrop(1);
hilfe_tree.setDragHandler(myDragHandler);
hilfe_tree.setOnDblClickHandler(onNodeSelect);
hilfe_tree.attachEvent(“onAllOpenDynamic”,function(){
hilfe_tree.attachEvent(“onOpenEnd”,function(){
window.setTimeout(function(){ // need to wait while open tread will be closed
hilfe_tree.saveOpenStates(“hilfe”);
},1);
});
});
hilfe_tree.loadXML(“xml.php”,function(){hilfe_tree.loadOpenStates(“hilfe”);});
function myDragHandler(idFrom,idTo,idBefore)
…
so what is wrong?
thx
There was a problem with older version of dhtmlxtree, please try to use latest version of dhtmlxtree_xw.js ( was sent by email ) - with it your code must work correctly.
Hello,
I dont get an email until yet but I found a solution yesterday night
so my solution works correctly
hilfe_tree=new dhtmlXTreeObject(“inhalt_treemenu”,“100%”,"",0);
hilfe_tree.setImagePath("…/script/treetool/imgs/");
hilfe_tree.setDragBehavior(“complex”);
hilfe_tree.enableDragAndDrop(1);
hilfe_tree.setDragHandler(myDragHandler);
hilfe_tree.setOnDblClickHandler(onNodeSelect);
hilfe_tree.attachEvent(“onOpenEnd”,function(){
window.setTimeout(function(){ // need to wait while open tread will be closed
hilfe_tree.saveOpenStates(“hilfe”);
},1);
});
hilfe_tree.loadXML(“themen.php”,function(){
hilfe_tree.loadOpenStates(“hilfe”);
});
May you send me please the latest version of dhtmlxtree.
I bought it last week.
thank you