Opened 10 years ago
Closed 10 years ago
#14167 closed bug (notabug)
invalid to load FileReader's method onload
Reported by: | 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!
Note: See
TracTickets for help on using
tickets.
Please ask for help on stackoverflow, on the jQuery forums, or in the #jquery irc channel.