I am working on application using flask python from the server side
So in the html side I have drag copy and past events which works very well
function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
return ev.target.id
}
function drop(ev) {
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
var nodeCopy = document.getElementById(data).cloneNode(true);
nodeCopy.id = "newId"; /* We cannot use the same ID */
ev.target.appendChild(nodeCopy);
}
Then this is the element I want to drag
<div class="row" id=1 draggable="true" ondragstart="drag(event)" >
And I dropped it here
<div id="div1" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
My question is how do I send information to flask about the dragged item and the place where he was dropped. 3 days of searching and nada