javascript / dhtml
Return to Index
Disabling Both Left & Right Mouse Buttons
About This Demo...

Obviously, we have to do this demo in a pop up... so CLICK HERE.

On the pop-up demo, try both left-click and right-click with your mouse.  Both left-click and right-click will trigger an alert box -- effectively disabling the mouse on the page.

Suggested Uses & Use Notes

You want to use this technique with caution and forethought, of course, since it effectively disables any mouse action on the page.  (It also protects your source code, or course.)

The technique is most useful in display-only pop ups, as shown in this demo.

Note that this technique only works in MSIE.  NS completely ignores it.

The Code & Instructions...

Click HERE to Select the Code.  (Pressing Ctrl+C will then place it in your Clipboard.)


Return to Index
Copyright 1996-2004 by
All Rights Reserved