Some thing like this:
document.onmous edown = mousedown_handl er
function mousedown_handl er(event) {
event = (event) ? event : ((window.event) ? window.event null);
if (!event) {
return;
}
// This is the message that will appear
var no_right_click = "Sorry, right-clicking is not allowed!"
if (document.all) {
//Probably Internet Explorer 4 and later
if (event.button == 2 || event.button == 3) {
alert(no_right_ click)
return false
}
}
else if (document.getEl ementById) {
// Probably Netscape 6 and later
if (mouse_event.wh ich == 3) {
alert(no_right_ click)
return false
}
}
else if (document.layer s) {
// Probably Netscape 4
if (mouse_event.wh ich == 3) {
alert(no_right_ click)
return false
}
}
}
Seen wrote:
This has probably been covered before but I can't seem to find it. I
want to disable the user from using the right mouse button that brings
up a windown menu of options. How's it done?????