473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Apr 2 '08 #1
1 1882
pronerd
392 Expert 256MB
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.
Apr 2 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John Smith | last post by:
In the code snippet below, I tried to allow the user to choose a page to view by selecting an item from a dropdown list. I could make it work on Mozilla and related browsers, but I couldn't make it...
1
by: coolsti | last post by:
I am trying to let the user drag a rectangle over an image, which will then let the user zoom in on the dragged area. However, I am doing something wrong in implementing the onmousedown and...
2
by: Aaron Queenan | last post by:
I have an event handler in a subclass of TreeView: protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Right)...
0
by: Scott | last post by:
I have a derived DataGrid class that I'm using to allow the user to highlight multiple cells for cut/copy/paste (in addition to several other features.) When the user selects to open a new file...
3
by: Scott | last post by:
I have a derived DataGrid class that overrides the OnMouseUp event so that I can highlight multiple cells for cut/copy/paste functionality. When the user selects to open a new file via a...
2
by: David Wake | last post by:
I am a complete Javscript newbie trying to produce a user interface similar to Google Maps -- the user should be able to click anywhere on the map and drag it in any direction. The Javascript...
9
by: jon | last post by:
Hello, I'm trying to experiment with some javascript to do some custom dragdrop handling. I wish to use the onMouseDown event to trigger the start of my drag, and onMouseup for a potentential...
1
by: NeilCarmichael | last post by:
I am flummoxed, I'm relatively new to javascript and I can't get my onmousedown onmouseup script to work. simply, I want to fire one function when I click down on a graphic and a second when I...
11
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/scripts/demo/onmouseup.html In Firefox, if I click in the black box and then release, I get a popup. If I click, drag the cursor, and then release, I don't....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.