By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,480 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,480 IT Pros & Developers. It's quick & easy.

onDrag handler in FireFox?

P: n/a
Hi,

I am trying to handle my mouse movements myself in my JavaScript
application which is ok except for the following problem.

If I happen to click on an image and then move the mouse, the "no-drop"
icon appears as the browser is starting to drage the image url
somewhere. When this happens, I no longer recieve any mouse events in
my JS app. This can be prevented in IE by adding an event handler for
the onDrag event that simply returns false. This prevents IE from
continuing to try and drag the image and instead it continues to send
mouse events.

However, I cannot find a way to do this in Firefox. Can anyone help?

Cheers,

Tom...

Oct 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


tf******@gmail.com wrote:
This can be prevented in IE by adding an event handler for
the onDrag event that simply returns false. This prevents IE from
continuing to try and drag the image and instead it continues to send
mouse events.

However, I cannot find a way to do this in Firefox.


<img onmousedown="if (event.preventDefault) {
event.preventDefault();
}"

--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 20 '05 #2

P: n/a

Martin Honnen wrote:

<img onmousedown="if (event.preventDefault) {
event.preventDefault();
}"


Perfik! Thanks Martin.

Oct 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.