PDA

View Full Version : How to disable middle scroll button



Nammer
12-08-2006, 10:34 AM
You know how you can press the middle button on your mouse and scroll up and down? Is there any way to disable this through javascript because I have a page on my site that would be more beneficial if this action was disabled.

Hopefully this is as simple as the "disable right click" code.

Thanks in advance for all of your help!

jscheuer1
12-09-2006, 04:19 AM
The browsers that have that feature mostly also disable attempts to disable it.

shachi
12-10-2006, 09:23 AM
Why don't you take a look at this?? http://adomas.org/javascript-mouse-wheel/test2.html

jscheuer1
12-10-2006, 10:46 AM
Why don't you take a look at this?? http://adomas.org/javascript-mouse-wheel/test2.html

That captures the mouse wheel rotation event, not the mouse wheel click event:


You know how you can press the middle button . . .

shachi
12-10-2006, 03:01 PM
Oops, sorry! :(

jscheuer1
12-10-2006, 03:44 PM
That's OK, the OP might have actually meant that, though I doubt it. In any case, the script that you linked to will surely come in handy for someone.

shachi
12-10-2006, 03:47 PM
Phew, Thanks jscheuer1. :)