general drag handler for any item

Drag and drop functionality works great for widgets. I’d like to do the same with any element on the page.



is this possible?



for example, if i have something like this in the body:







and i want the user to be able to drag that image to some target (defined with addDragLanding()), is that possible?



and: can i use the cross-frame functionality as well for this (via new dhtmlDragAndDropObject())



thanks!

Actually the used drag-n-drop functionality can be used with any custom html nodes, you can check samples

    dhtmlx.com/docs/products/dhtmlxT … g_out.html

while both pages written around the tree, actual drag-n-drop doesn’t depend on it and can be used just with pure HTML fields without tree or any other component.

to create dragable item
    dragger=new dhtmlDragAndDropObject();
    dragger.addDraggableItem(obj,dropper);

where obj - HTML done wwhic will be used as drag ( an image in your case )
    dropper - object which will control d-n-d process, you can check dhtmlxtree_dragin.js, which provides more detail.