Drag and drop is not working on the tree. Below is the code

Drag and drop is not
working on the tree. Below is the code I used to enable drag and drop on the
tree.



                     
   tree=new
dhtmlXTreeObject(document.getElementById(‘tree1’),“100%”,“100%”,0);


                     
   tree.setImagePath(“/resources/images/dhtmlXTree/”);

                     
   tree.enableSmartXMLParsing(true);

                     
   tree.enableDragAndDrop(true);

                     
   tree.setOnClickHandler(tonclick);

                     
   tree.loadXML(“/editTree/showleftXML.do”,tonrender);
       

                     
   tree.setDragHandler(tondrag);

                     
   tree.setDropHandler(tondrop);



The issue Iam encountering is the node is being dragged but not dropped.
“tondrag” function is called but “tondrop” is not called
and moreover the node is also not being physically.



I tried calling the setDragHandler and setDropHandler before loadXML method.
But, still didn’t work. Can you please look into the issue and let me know if
there are any changes to be done to the way Iam calling the event handlers ?

The onDrag and onDrop events can
be defined at any time.

Please be sure that you�re returning “true” from your onDrag
handler, returning any other value, or not returning any values at all can
block drag-n-drop ( in such case onDrop will not be called, because drag-n-drop
ignored ).