I am trying to implement dhtmlxtree and am getting an error that n.id is not an object. I am initializing the tree using HTML, and the tree builds fine.
Here is the HTML code I am using to implement the tree
<div
class = “dhtmlxTree”
id = “treeboxbox_tree”
setImagePath = “/_include/clientsidescript/dhtmlxTree/imgs/csh_vista/”
style = “width:250px; height: auto; overflow:scroll; font-family: Verdana;”>
… tree here…
Such error may occur if tree container can’t be located
In your case, the code which init tree executed before related html container rendered on page, you can
a) move init code in onload handler or just after html container of tree
b) remove code at all, having class = “dhtmlxTree” is enough to init tree, you need not any additional code.