Results 1 to 2 of 2

Thread: Need code to disable Right Click on my website.

  1. #1
    Member
    Join Date
    Oct 2013
    Location
    Netherland
    Posts
    49

    My Social Networking

    Add endoli on Google+

    Need code to disable Right Click on my website.

    Hello i am looking for any code to disable right click on my web. Any sharing will be appreciated.

  2. #2
    Administrator M.A.A's Avatar
    Join Date
    Oct 2011
    Posts
    345

    My Social Networking

    Add M.A.A on Facebook Add M.A.A on Google+
    I will suggest you to google about this surely you will find better. here is a code i have saved few years back in my PC. hope this will work.
    Code:
    <script language=JavaScript>
    <!--
    var message="Permission Denied!";
    ///////////////////////////////////
    function clickIE4(){
    if (event.button==2){
    alert(message);
    return false;
    }
    }
    function clickNS4(e){
    if (document.layers||document.getElementById&&!document.all){
    if (e.which==2||e.which==3){
    alert(message);
    return false;
    }
    }
    }
    if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
    }
    else if (document.all&&!document.getElementById){
    document.onmousedown=clickIE4;
    }
    document.oncontextmenu=new Function("alert(message);return false")
    // -->
    </script>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •