...

View Full Version : event.button in FF



topcoder
08-02-2006, 11:29 AM
My scenario is this: When the user clicks on an element in the HTML document and then drags the mouse, I need to perform certain custom actions. Hence I need to determine what button the user has clicked. This is possible using event.button. In IE, it returns 0 when the mouse is moved, and 1 when the mouse is moved with the left button pressed.

But not so in FF. FF returns 0 when the mouse is moved, but it also returns 0 when the mouse is moved with the left button pressed.:mad: Why is this so? Is there no way to differentiate between a normal mousemove and a drag in FF?

topcoder
08-11-2006, 08:55 AM
Is there no solution to this? Or is something wrong on my side?

RexxCrow
08-11-2006, 10:42 AM
These should help a little:

http://dunnbypaul.net/js_mouse/

http://www.quirksmode.org/js/improt.html

http://www.faqts.com/knowledge_base/view.phtml/aid/992/fid/145

http://www.devarticles.com/c/a/JavaScript/Handling-events-with-the-DOM-Part-III/6/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum