Almost 'Drag & Drop'

You might wish to go straight to the demo, or first read the blurb. Sriparna wrote:

"I am trying to code a drag and drop feature for my website. But it is slightly different from the conventional ones available in the net.

TEST CASE: There are say 20 employees in our company with 20 mail ids and there are 4 depts. On the left side: All Employees' names will be shown & their mail ids will be carried as hidden fields. On the right side: 4 depts will be shown as 4 groups/folders ( whichever suitable) We should be able to drag any of the names from left and drop into any of the 4 folders. On submitting the form on the right side, the mail ids of the employees dropped into the folder should be stored in the database against respective folder/dept id."

Out of sheer bloody-mindedness we chose to implement things slightly differently.. (and from right to left)!

Note that in our simplistic version, you have to click on an item to pick it up, and then click on the destination to move the item. (We actually find this easier than dragging the mouse around)! It is almost certainly possible to use a true drag and drop - but will be more complex as you then have to cater for the idiosyncratic handling of mouse clicks and releases in both Netscape and MSIE. In addition, you have to cater for drops on areas where they are not meant, and so on. We thought our solution a bit more elegant. If you really want to make things complex, you can (I suppose) even use layers to show the progress of the item as it's dragged - absolutely hideous and unnecessary!


jvs
2001-7-8.