View Full Version : stop dragging of images in internet explorer

03-12-2004, 01:26 PM

*What I want to do:
Display a div (position: absolute) over top of an image and be able to draw a box (a div with position: absolute; border: 1px solid red over the image without the image starting to drag (ie: not-allowed cursor). Basically I want the js event handler to ignore the fact that there is an image 'underneath' the div.

*What is happening:
When I go to draw the box over the image, the box starts, but then the image starts to drag and the box won't continue to update with the onmousemove event.

*What I have tried:
I tried setting ondragstart and onselectstart to false. I tried adjusting z-indexs and such (but that only helps so that you can't right click copy the image).

Thank you and I await your responses

03-12-2004, 06:37 PM
About Mouse Capture (http://msdn.microsoft.com/workshop/author/dhtml/overview/mousecapture.asp)