nimexx
Jun 29th, 2005, 07:32 PM
Im looking for some direction on dragging an object and dropping it on another object via javascript. I have seen a few drag/drop examples but they seem far more complicated then they need to be and I dont want 50K js files with my webpages. I have some basic drag functions that work but Im having trouble with the drop.
Does anyone know of a good way to detect what object Im over when I release the mouse when dragging? A mouseover function doesnt seem to work because it doesnt seem to fire while Im dragging something. An ondrop doesnt work because its IE only. I thought I might be able to loop through every object in the DOM to check the coordinates but Im thinking multiple objects could be at that coordinate so that doesnt really tell me what the target object should be. I would be dragging an image to a div or another image in that div.
Anyone know a good way to do a simple drag/drop thats cross browser compatable or point me in the right direction?
Does anyone know of a good way to detect what object Im over when I release the mouse when dragging? A mouseover function doesnt seem to work because it doesnt seem to fire while Im dragging something. An ondrop doesnt work because its IE only. I thought I might be able to loop through every object in the DOM to check the coordinates but Im thinking multiple objects could be at that coordinate so that doesnt really tell me what the target object should be. I would be dragging an image to a div or another image in that div.
Anyone know a good way to do a simple drag/drop thats cross browser compatable or point me in the right direction?