Disable Right Click on a ProductDyno Section/Sub-Section

NOTE: This script has been provided by a customer.  It is not part of ProductDyno per se and is not supported.  It may not work in some browsers - especially following a browser update


To disable  "RIGHT CLICK" on a section or subsection, you can add the following code using the ‘Code’ content block, in each section or sub-section that you would want to disable right-clicking on.

//Disable right click script via java script code
<script language=JavaScript>
//Disable right click script
var message = “”;
///////////////////////////////////
function clickIE() {
    if (document.all) {
        (message);
        return false;
    }
}
function clickNS(e) {
    if (document.layers || (document.getElementById && !document.all)) {
        if (e.which == 2 || e.which == 3) {
            (message);
            return false;
        }
    }
}
if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = clickNS;
} else {
    document.onmouseup = clickNS;
    document.oncontextmenu = clickIE;
}
document.oncontextmenu = new Function(“return false”)
</script>
<br>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.