Javascript Contextmenu


How to disable the contextmenu?

Use JavaScript to intercept the contextmenu event.

document.onmousedown=right where right is the name of a function.

function disablePrintViaRightClick(e) {
    var hasPrint = jQuery('#printPrivilege').val();
    if (hasPrint == "NO") {
        alert("This Page is fully protected");
        return false;

$(document).ready(function() {
    jQuery(document).bind("contextmenu", disablePrintViaRightClick);

How to implement your own contextmenu that integrate well with the default context menu?

I still need to read the above links.

How to disable certain default context menu option?

I still need to read the above links to see if this is possible.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License