I am triying to make a tree that loads nodes on demand, here is the code.
<HTML>
<head>
<link rel="STYLESHEET" type="text/css" href="./codebase/dhtmlxtree.css">
<script src="./codebase/dhtmlxcommon.js"></script>
<script src="./codebase/dhtmlxtree.js"></script>
</head>
<BODY>
<div id="treeboxbox" style="background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"></div>
<script>
tree = new dhtmlXTreeObject("treeboxbox", "100%", "100%", 0);
tree.setImagePath("./codebase/imgs/");
tree.enableCheckBoxes(1);
tree.setXMLAutoLoading("./loadItems.jsp");
tree.loadXML("./loadItems.jsp");
tree.setXMLAutoLoadingBehaviour("id");
tree.setEscapingMode("default");
</script>
</BODY>
</HTML>
The load Item generate a XML in this Structure
<tree id="0">
<item text="Parent 1" id="Parent 1" child="1">
<item text="Node 1" id="Node 1" child="1"/>
<item text="Node 2" id="Node 2" child="1"/>
<item text="Node 3" id="Node 3" child="1"/>
</item>
</tree>
The Problem arise that every time i load a node, the tree create a node at the top level of the tree and i have to click again on the original node to open it