How to disable the context-menu of the browser?
I already have a JS function for that but it is still not possible to prevent the right-click if the alert is removed by keypress while holding the mouse right-button.
My function is as below:
<SCRIPT>
function fnRightClickDisable() {
if(event.button == 2 || event.button == 3) {
alert("Right-click is disabled"
return;
}
}
</SCRIPT>
<SCRIPT LANGUAGE = "JavaScript">document.onmousedown = fnRightClickDisable</SCRIPT>
I already have a JS function for that but it is still not possible to prevent the right-click if the alert is removed by keypress while holding the mouse right-button.
My function is as below:
<SCRIPT>
function fnRightClickDisable() {
if(event.button == 2 || event.button == 3) {
alert("Right-click is disabled"
return;
}
}
</SCRIPT>
<SCRIPT LANGUAGE = "JavaScript">document.onmousedown = fnRightClickDisable</SCRIPT>