Walter Zorn's Drag & Drop Code
I need a simple drag & drop screen to allow my user to select images from a group.
I have discovered this code at http://www.walterzorn.de/en/dragdrop/dragdrop_e.htm
Works great except for one thing.
I cannot get the getEltBelow() method to return anything.
I am trying to drop one image on top of another and get the name of the element below the dragged image.
Following Zorn's instructions:
I have included both images in the and I have the SET_DHTML("imgdrag"+TRANSPARENT+CLONE,"imgtgt"+NO_DRAG) script just before the </body> tag.
The drag-able image drags about nicely. I can retrieve all sorts of properties from it with dd.elements.imgdrag.whatever. I can even get its position.
I found a post where some other poor guy wrote his own code to get the x,y from Zorn and then query the DOM to see what was there. All because he couldn't make this work either. I have tried many permutations; However, I am at a loss to get anything but null from the example provided:
var dropTarget = dd.obj.getEltBelow();
Has anyone worked this out? I surely need your help.
Thanks to all who looked at this but
Never Mind, we have the OK to move on and do this with HTML5.
Thanks to Walter for all the work, May he rest in peace.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)