Jump to content

Recommended Posts

Posted

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>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...