Disable Right Button Menu

[Total: 0    Average: 0/5]

This shows how to have the right button disabled.

Head Code:

<SCRIPT LANGUAGE="JavaScript1.1">
<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2)) {
alert("Sorry, you do not have permission to right click.");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Sorry, you do not have permission to right click.");
return false;
}
return true;
}
 
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
//  End -->
</script>

Body Code:

<big>Type right button</big>

Times Viewed: 4

Leave a Reply

Your email address will not be published. Required fields are marked *