Initialize object on page

 

<div id="treeboxbox_tree" style="width:200;height:200"></div> <script> tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0); tree.setImagePath("../imgs/"); tree.loadXML("tree.xml") </script> Parameters passed to the constructor are:
  • object to attach tree to (should be loaded before calling constructor)
  • width of the tree
  • height of the tree
  • identifier of level parent to tree root level

  • Specify Additional parameters of the tree:
  • setImagePath(url) - method specifies the path to the folder with tree icons
  • loadXML("tree.xml") - load tree items from XML