Copy with Drag-n-Drop

Mercy drag-and-drop allows you to copy nodes from one tree to another. In the current sample it is enabled for the left tree.

</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title>Copy with Drag-n-Drop</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<link rel="stylesheet" type="text/css" href="../common/demo_style.css"/>
	<script>
		var myTree, myTree2;
		function doOnLoad(){
			myTree = new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0);
			myTree.enableDragAndDrop(true);
			myTree.enableMercyDrag(true);
			myTree.enableCheckBoxes(true);
			myTree.setImagePath("../../../skins/web/imgs/dhxtree_web/");
			myTree.enableSmartXMLParsing(true);
			myTree.load("../common/tree.xml");
			myTre2 = new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0);
			myTre2.setImagePath("../../../skins/web/imgs/dhxtree_web/");
			myTre2.enableDragAndDrop(true);
			myTre2.enableSmartXMLParsing(true);
			myTre2.insertNewItem(0,"1","Root");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Copy with Drag-n-Drop</h1>
	<p>Mercy drag-and-drop allows you to copy nodes from one tree to another. In the current sample it is enabled for the left tree.</p>
	<table>
		<tr>
			<td>
				<div id="treeboxbox_tree" class="tree_demo_samples"></div>
				</div>
			</td>
			<td style="padding-left:25px" valign="top">
				<div id="treeboxbox_tree2" class="tree_demo_samples"></div>
				</div>
			</td>
		</tr>
		<tr>
		</tr>
	</table>
</body>
</html>

Documentation

Check documentation to learn how to use the components and easily implement them in your applications.