views:

365

answers:

3

I've seen this and I have to admit I'm pretty impressed:

http://gmailblog.blogspot.com/2010/04/drag-and-drop-attachments-onto-messages.html

I'm almost certain that this is an HTML 5 feature (it's supported on Chrome and Firefox 3.5), and was wondering if somebody knew how is the browser feature called.

Bonus points for a tutorial/article on how to do something similar!

+6  A: 

I believe this may be of help:

http://www.appelsiini.net/2009/10/html5-drag-and-drop-multiple-file-upload

dhorn
+1  A: 

For an HTML5 demo of drag-n-drop, check out:

http://html5demos.com/drag-anything

Seems like dragover, dragenter, dragexit, drop events + event.dataTransfer are how it all works. Putting it together with a multi-part/form ajax POST like the link that dhorn gave is more impressive in my opinion. I would hope that it could be done a little easier than that.

Aaron Wagner
A: 

I wrote several article about Drag'n Drop, see here:

http://hacks.mozilla.org/category/drag-and-drop/

Paul Rouget