Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by GB on Dec 10, 2008 15:02
open dhtmlx forum
Trouble loading Tree in Layout

Thank you again for helping me with Tree - working fine.

Now I am trying to attach the tree to the Layout. Tree is not showing up.

Here is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    
<title>Fullscreen Init</title>
<link rel='STYLESHEET' type='text/css' href='tree/codebase/dhtmlxtree.css'>
    
<script src='tree/codebase/dhtmlxcommon.js'></script>
<script src='tree/codebase/dhtmlxtree.js'></script>

<link rel="stylesheet" type="text/css" href="codebase/dhtmlxlayout.css">
<link rel="stylesheet" type="text/css" href="codebase/skins/dhtmlxlayout_dhx_blue.css">
<link rel="stylesheet" type="text/css" href="codebase/dhtmlxwindows.css">
<link rel="stylesheet" type="text/css" href="codebase/skins/dhtmlxwindows_dhx_blue.css">
<script src="codebase/dhtmlxcommon.js"></script>
<script src="codebase/dhtmlxlayout.js"></script>
<script src="codebase/dhtmlxwindows.js"></script>

</head>

<body style="width:100%;height:100%;margin:0px;overflow:hidden;">

<script>
var dhxLayout=new dhtmlXLayoutObject(document.body,"2U");
dhxLayout.cells("a").setWidth(200);
dhxLayout.cells("a").setText("Menu");
dhxLayout.cells("b").setText("Tournament List");

var dhxTree = dhxLayout.cells("a").attachTree(0);
dhxtree.setImagePath('tree/codebase/imgs/');
dhxtree.loadXML("tourn_menu.xml");    
</script>


</body></html>

Can you see what I am missing?
Answer posted by Support on Dec 11, 2008 02:51
Your code:

var dhxTree = dhxLayout.cells("a").attachTree(0);
dhxtree.setImagePath('tree/codebase/imgs/');

dhxTree and dhxtree are different variables.