onmouseup() not firing on IMG

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerry178
    New Member
    • Apr 2008
    • 1

    onmouseup() not firing on IMG

    I'm trying to capture and handle the mouse dragging (mouse move with the left button pressed) activity on an IMG object. I wrote event to handlers for onmousedown, onmousemove and onmouseup. However, only onmousedown was called, the other two were always ingored. And when I drag the mouse, the mouse cursor changes to a "NO" cursor, as if it was trying to drag & drop the image to somewhere. How do I bypass or disable this default drag & drop behavior and use my own dragging handler?

    Thanks
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    You will need to have the function that is called by the onMouseDown event add an event handler for onMouseUp. You will want to have onMouseMove set to be an event for the entire page, not just the image object.

    Comment

    Working...