Location: PHPKode > projects > Neobill > NeoBill0.5.6/include/dhtmlxTree/samples/treeEx11.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<title>DHTML Tree samples. dhtmlXTree - Initialize object on page</title>
	<link rel="STYLESHEET" type="text/css" href="../css/dhtmlXTree.css">
	<script type="text/javascript" src="../js/dhtmlXCommon.js"></script>
	<script type="text/javascript" src="../js/dhtmlXTree.js"></script>
	<style type="text/css">
	body { font-family:arial;font-size:12px; font-size:12px }
	h1 {cursor:pointer;font-size:16px;margin-left:10px;line-height:10px}
	xmp {color:green;font-size:12px;margin:0;font-family:courier;background-color:#e6e6fa;padding:2px}
	</style>
</head>
<body>
	<h1>Initialize object on page</h1>
	<table>
		<tr>
			<td>
				<div id="treeboxbox_tree" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver; overflow:auto;"/>
			</td>
			<td rowspan="2" style="padding-left:25px" valign="top">

			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
	</table>
<hr>
<XMP>
<div id="treeboxbox_tree" style="width:200px;height:200px"></div>
<script type="text/javascript">
	tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
		tree.setImagePath("../imgs/");
		tree.loadXML("tree.xml")
</script>
</XMP>
		Parameters passed to the constructor are:
			<li>object to attach tree to (should be loaded before calling constructor)</li>
			<li>width of the tree</li>
			<li>height of the tree</li>
			<li>identifier of level parent to tree root level</li><br>
		Specify Additional parameters of the tree:
			<li>setImagePath(url) - method specifies the path to the folder with tree icons</li>
			<li>loadXML("tree.xml") - load tree items from XML</li>
	<script type="text/javascript">
			tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
			tree.setImagePath("../imgs/");
			tree.loadXML("tree3.xml")
	</script>
<br><br>

</body>
</html>
Return current item: Neobill