Description of code :
To implement drag and drop operation in the html page we have created two text areas. One is the source text area from where we have to select the text and another is the destination text area to where we have to drop the selected text. To implement this functionality we have created a div which contains both text areas "source" as well as "destination" and we have called the function dragDropFunc() on event "mouseup" of the whole div. In function dragDropFunc() we have made the source object to be able drag and drop like the code given as below:
|var isDragged = document.all.source.dragDrop();|
Here is the full example html code for dragDropExample.html as given below:
Select some or full part of the text to drag it to the destination text and then drop it to the another text area.
Posted on: January 29, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles