Is it possible for javascript or html to create a drop zone for images to be dragged into by a user? I suppose it is an image placeholder that will accept images dragged into it while the page is live? Any help will be Awesome..!
+1
A:
Images from where? If you want to be able to drag images from the webpage itself, that is possible, but if you want images from outside to be dropped, that is simply not possible using JavaScript. difficult at the moment.
Edit: As @John Boker mentioned, it is possible, but at the moment, the APIs are highly non-standard and vary wildly between browsers. HTML 5 will support a standard and simpler API for this but HTML 5 itself is not a standard yet.
Some resources:
- HTML5 Drag and Drop File API - currently works only in Firefox, will hopefully become standard soon
- VBDataObject Interface - works only in IE
casablanca
2010-10-29 04:35:00
it's possible to drag files from the desktop to the website, although it's not that easy. an example would be the gmail attachments. drag a file over to the email you're composing and it will add/upload it.
John Boker
2010-10-29 04:39:28
any code snippet will be help full....
Zain
2010-10-29 06:38:30
@user441207: I've added some links.
casablanca
2010-10-29 14:19:34