altagur Posted December 6, 2013 Posted December 6, 2013 Thanks very much for butiful example how do dragdrop from desktop to browser I done this from desktop to browser and from one tunidbgrid to another tunidbgrid Google Chrome allow dragdrop from browser to desktop. If you want to drag from tunudbgrid need put tunihtmlframe invisible and in his body do grid draggable and assign dragstart event <script type="text/javascript">var yg = document.getElementById(YouForm.YouGrid.id);function GetGrid(obj){ var grid = obj; var par = 0; while((par==0)&&(grid!=null)){ if(grid == yg){ par = 1; }else{ grid = grid.parentNode; } } return grid;}function dragStart(evt){ /* Hear we can get grid id and call ajax to create file /img/page.png var curgrid = GetGrid(evt.target); if (curgrid==null) return true; ajaxRequest(ajaxtarget, "createtmpfile", ["curgrid="+curgrid.id]);*/ files = "image/jpeg:Page5.jpg:"+document.location+"/img/page.png"; event.dataTransfer.setData("DownloadURL",files); return true;}function initEventHandlers(){ // set EventHandlers for dropbox for drag and drop: // // yg.draggable = true; yg.addEventListener("dragstart", dragStart, false); }initEventHandlers();</script> Quote
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.