how to drag an element from parent page to child page
hello everybody,
There are 2 pages: a and b. In the page a, there is an
iframe
and a
input type=text
. The
src
of this
iframe
is page b. I want to drag the elements in page b into the "a.input". How can I do this?
jquery of page a:
$(document).ready(function() { var c = {}; $("#drag").contents().find("#move").draggable({ helper: "clone", start: function(event, ui) { c.tr = this; c.helper = ui.helper; } }); $("#drop").droppable({ drop: function(event, ui) { var inventor =ui.draggable.text(); $(this).find("input").val(inventor); } }); });
html of page a:
<table> <tr> <td id="drop"> <input type="text" style="width: 75%" ></input> </td> <td > <iframe id="drag" src="date.php"/> </td> </tr> </table>
html of page b:
<table> <tr> <td id="move">aaaaa</td> </tr> </table>