Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with Drag Drop from one region to other

    I'm trying to use Drag Drop feature. Using simple example given in below site

    http://www.skybyte.net/scripts/drag-drop/

    I've three Drop zones (Drop1, Drop2 and Drop3).
    i) I've DragA in Drop1 zone.
    ii) I moved it from Drop1 to Drop2 and Drop3.
    It has cloned the child and removed from Drop1 well. iii) When I move from Drop2 to Drop3 it is cloned in Drop2 BUT it is NOT removing the item from Drop2!!!

    Can someone please tell me why it is not removing from Drop2 when I try to move it back.

    JS is as given below


    // FROM DRAG --------------------------
    new Drag(''DragA',{ caption: 'moving A'});

    // FROM DROP --------------------------
    var i=$('Drop1');
    new Drop(i,{
    accept:'DIV',
    caption: 'Location 2 Time 2',
    mouseUp: function(d,e){ clone=e.cloneNode(true); e.parentNode.removeChild(e); d.appendChild(clone); }
    });

    var i=$('Drop2');
    new Drop(i,{
    accept:'DIV',
    caption: 'Location 2 Time 2',
    mouseUp: function(d,e){ clone=e.cloneNode(true); e.parentNode.removeChild(e); d.appendChild(clone); }
    });

    Thanks,
    Rajesh

  • #2
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Fixed it.. Got the help from support

    just removed cloning functions and it works well on IE/Firefox.

    Here is where I changed the code:

    Before:
    mouseUp: function(d,e){ clone=e.cloneNode(true); e.parentNode.removeChild(e); d.appendChild(clone); }

    Fixed to:
    mouseUp: function(d,e){ e.parentNode.removeChild(e); d.appendChild(e); }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •