| Script | Description | Script | Description | Script | Description |
|---|---|---|---|---|---|
| 1 | oncontextmenu | 2 | oncontextmenu alert box |
3 | oncontextmenu key event |
| 4 | oncontextmenu alert box key event |
5 | oncontextmenu images only |
6 | oncontextmenu images only key event |
| 7 | oncontextmenu, images only, alert box, key event | ||||
The script on this page will completely disable the right click. An alert box IS triggered. This script is an extension of Script 2 to add support for Netscape 4.7x.
This is the code that is running on this page. Like the rest of these scripts it can easily be circumvented by turning off javascript or by using a browser that doesn't support javascript.
Cut and paste this code into the <head> part of your page.
<script type="text/javascript">
function ehan( evnt )
{
if( evnt.which == 3 )
{
alert( "No Right Click" );
return false;
}
return true;
}
function ocmh()
{
alert( "No Right Click" );
return false;
}
document.oncontextmenu = ocmh;
document.captureEvents( Event.MOUSEDOWN );
if( document.layers ) document.onmousedown = ehan;
</script>
| Browser Type | Works | Browser Type | Works |
|---|---|---|---|
| Internet Explorer 6.0 | Yes | Internet Explorer 5.5 | Yes |
| Mozilla .9, 1 | Yes | Netscape 4.7 | Yes |
| Netscape 6.2 | Yes | Opera 6, 7 | No |
MicroDrive Corporation is interested in extending this list. If you are viewing this page with a browser that is not listed please send us an email and tell us what browser you are using and whether it works or not. We will extend this table based on these reports. Thanks.