jamfitz001 Posted March 12, 2019 Share Posted March 12, 2019 I'm adapting some straightup examples of Drag / Drop from W3school. Everything seems to work with other Browsers as expected. IE is not working. I have an HTML object on my page: <div id="1717" class="mydrag_obj" draggable='true' ondragstart='func_dragstart(event)'> <a href="https://www.yahoo.com" target="_blank"> <div class="row_1"></div> <div class="row"_2"></div> </a></div> JavaScript: func_dragstart(ev) { ev.dataTransfer.setData("text/plain", ev.target.id);} When I drop - func_dropped_dropzone (ev) { ev.preventDefault(); alert ('card_id- ' + ev.dataTransfer.getData("text")); return true; } For all browsers ev.dataTransfer.getData("text")) ...the alert = card_id=1717 but for IE the alert = card_id="https://www.yahoo.com" can someone explain what I need to do to make IE return the ID of the DIV? Quote Link to comment https://forums.phpfreaks.com/topic/308452-javascript-dragdrop-ie-not-getting-it-right/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.