Skip to main content

Bug Tracker

Side navigation

#14167 closed bug (notabug)

Opened July 23, 2013 06:22AM UTC

Closed July 23, 2013 04:45PM UTC

invalid to load FileReader's method onload

Reported by: hilhert1987@gmail.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

Code like this:

$(document).ready(function(){

document.ondragover=function(e){

e.preventDefault();

};

document.ondrop=function(ev){

var reader = new FileReader;

reader.onload=function(){

var result = reader.result;

$("#textarea1").attr('value',result);

};

reader.readAsTxt(ev.dataTransfer.files[0],"utf-8");

ev.preventDefault();

};

});

</script>

the function onload of FileReader is invalid!

Attachments (0)
Change History (1)

Changed July 23, 2013 04:45PM UTC by timmywil comment:1

resolution: → notabug
status: newclosed

Please ask for help on stackoverflow, on the jQuery forums, or in the #jquery irc channel.