• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Damnit why cant IE getData from this drag n drop?

lozina

Lifer
So I'm trying to get the contents of the dragged data object for some feature I wish to implement.

Basically I have a DIV on my page which I made to accept drag drops. I have a function that is supposed to then get the contents of that drop and when I test it with Firefox it works fine, but in IE it keeps returning "null" data.

Here is my DIV:

Code:
<div id="target" onDrop="dropHandler(event)"></div>

Here is my drop Event function:

Code:
function dropHandler(event) {        
        alert('the data is '+event.dataTransfer);
        alert('the url data is '+event.dataTransfer.getData("URL"));
        alert('the text data is '+event.dataTransfer.getData("Text"));
      }

So for both IE and Firefox, I get an Object output on the first alert.

But then for the next two alerts IE gives me "null" while Firefox gives me actual data for both.

What I am doing is I am dragging the url from the address bar of the browser into this DIV.

Any ideas what I need to do for IE?
 
Back
Top