Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Matt Gifford on Feb 04, 2009 08:50
open dhtmlx forum
this.ParentObject error with dhtmlxtree

Hi

I'm trying to test my tree locally, as I have been unable to get the debug version of the common.js loading.
Ii have all files in the root, everything set up as it should be, but am receiving the following error:

this.parentObject is null
[Break on this error] this.parentObject=htmlObject;this.paren...ntextMenu)this._acMenu.hideContextMenu()

Here is the code I am using:

<link rel="STYLESHEET" type="text/css" href="dhtmlxtree.css">
<script src="dhtmlxcommon_debug.js"></script>
<script src="dhtmlxtree.js"></script>
<script src="ext/dhtmlxtree_start.js"></script>

<div id="treeBox" setImagePath="imgs/csh_bluebooks/" xclass="dhtmlxTree"
    style="overflow:auto;width:450px; height:518px; background-color:#f5f5f5;border :1px solid Silver;"></div>
    
<script type="text/javascript">
    tree = new dhtmlXTreeObject("treeBox","100%","100%",0);
    tree.setXMLAutoLoading("test.xml");
    tree.loadXML("test.xml");
    tree.enableCheckBoxes(1);
    tree.enableThreeStateCheckboxes(1)
    tree.setImagePath("imgs/");
    tree.enableIEImageFix(true);
</script>

Why is it doing this?
Answer posted by Support on Feb 04, 2009 09:59
Such error may occur if you are using incorrect ID of container object as part of tree's constructor. 

Attached sample uses the same init code ( dhtmlxtree 2.0 81107 ) and works correctly
Attachments (1)