Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
23
rated 0 times [  28] [ 5]  / answers: 1 / hits: 40193  / 12 Years ago, fri, july 20, 2012, 12:00:00

Okay, I have an element set up to receive a file-drop event, but when I look in event.dataTransfer it is blank. I haven't gotten around to learning the drag-n-drop HTML5 API just yet and am still a little foggy on it. I'm working on it at my site. If you wouldn't mind poking around my code and seeing what's going on, it would be highly appreciated. The entire event object is being logged.


More From » html

 Answers
325

It's working fine, it's just a bug with the console.



function onDrop(event) {
event.preventDefault();
console.log(event.dataTransfer.files[0]);
}

[#84134] Thursday, July 19, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
austynp

Total Points: 505
Total Questions: 118
Total Answers: 106

Location: Tajikistan
Member since Sun, Aug 29, 2021
3 Years ago
austynp questions
;