Drag and Drop
This JavaScript tree menu has extended drag-and-drop functionality (within one tree, between trees, between frames). Drop-as-sibling behavior makes it easy to reorder nodes in a tree view. You can easily edit the tree by dragging nodes within one tree or between trees or even to another object.
Drag-and-Drop works in each tree and between trees too.
</> Source
<!DOCTYPE html>
<html>
<head>
<title>Drag and 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.setImagePath("../../../skins/web/imgs/dhxtree_web/");
myTree.enableDragAndDrop(true);
myTree.load("../common/tree_05_drag_n_drop.xml");
myTree2 = new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0);
myTree2.setImagePath("../../../skins/web/imgs/dhxtree_web/");
myTree2.enableDragAndDrop(true);
myTree2.load("../common/tree_05_drag_n_drop.xml");
}
</script>
</head>
<body onload="doOnLoad()">
<h1>Drag and Drop</h1>
<p>
This JavaScript tree menu has extended drag-and-drop functionality (within one tree, between trees, between frames). Drop-as-sibling behavior makes
it easy to reorder nodes in a tree view. You can easily edit the tree by dragging nodes within one tree or between trees or even to another object.
</p>
<table>
<tr>
<td valign="top">
<div id="treeboxbox_tree" class="tree_demo_samples" style="height:400px"></div>
</td>
<td style="padding-left:25px" valign="top">
<div id="treeboxbox_tree2" class="tree_demo_samples" style="height:400px"></div>
</td>
</tr>
</table>
<p>Drag-and-Drop works in each tree and between trees too.</p>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.