Location: PHPKode > projects > Neobill > NeoBill0.5.6/include/dhtmlxTree/samples/treeEx32.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 - Drag and Drop</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:14px; 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>Drag and Drop</h1>

	<table>
		<tr>
			<td valign="top">

				<div id="treeboxbox_tree" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver; overflow:auto;"></div><br>
				<br>
				
			</td>
			<td rstyle="padding-left:25px" valign="top">
			
				<div id="treeboxbox_tree2" style="width:250px; height:218px;background-color:#f5f5f5;border :1px solid Silver; overflow:auto;"></div><br>
				<br>

			</td>
		</tr>

	</table>
				Drag&ampDrop works in each tree and between trees too.
	<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/");
			
			//enable Drag&Drop
			tree.enableDragAndDrop(1);
			//set my Drag&Drop handler
			tree.setDragHandler(myDragHandler);
			tree.loadXML("tree.xml");

			function myDragHandler(idFrom,idTo){
				//if we return false then drag&drop be aborted
				return true;
			}
</script>
</XMP>	
 
	<script type="text/javascript">
			tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
			tree.setImagePath("../imgs/");
			tree.enableDragAndDrop(1);
			tree.loadXML("tree3.xml");

			tree2=new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0);
			tree2.setImagePath("../imgs/");
			tree2.enableDragAndDrop(1);
			tree2.loadXML("tree5.xml");

	</script>
<br><br>

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