Results 1 to 4 of 4

Thread: Disable the right click option in my website

  1. #1
    Join Date
    Mar 2009
    Posts
    42

    Disable the right click option in my website

    I am making a website & want to make it secure from the consumer from fetching the content. So i just wanted to disable the the right click option on my website. Please Help Me with the HTML Code...!

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Disable the right click option in my website

    Here is the code for HTML just copy & paste it on the page where you want to stop right click option on it.

    <SCRIPT language=JavaScript>
    var message = "function disabled";
    function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
    if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
    document.onmousedown = rtclickcheck;
    </SCRIPT>

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Disable the right click option in my website

    Here is the java script. You have to paste it in the <head>...</head> tags of your html code.

    <SCRIPT>function click() {if (event.button==2) {alert('Ooops..!\nRight click is disabled!');}}document.onmousedown=click// - -></SCRIPT>

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Disable the right click option in my website

    Copy and paste the code between the <head> </head> tags of your webpage.

    <script language=JavaScript>
    var message="Copy Rights -- Cannot Copy anything from HERE";
    function click(z) {
    if (document.all) {
    if (event.button == 2) {
    alert(message);
    return false;
    }
    }
    if (document.layers) {
    if (z.which == 3) {
    alert(message);
    return false;
    }
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=click;
    </script>

Similar Threads

  1. Blocking right click on website
    By Caidenn in forum Software Development
    Replies: 5
    Last Post: 22-01-2010, 09:15 PM
  2. Right click causes Move to/Copy to option on Start Menu
    By Jarini in forum Operating Systems
    Replies: 5
    Last Post: 16-12-2009, 01:10 AM
  3. Right click option not working
    By Ameyaa in forum Windows Software
    Replies: 3
    Last Post: 04-04-2009, 08:46 PM
  4. Customize Right click option
    By hasan in forum Customize Desktop
    Replies: 3
    Last Post: 12-11-2008, 09:43 AM
  5. unable to choose single click option
    By oldgoat in forum Operating Systems
    Replies: 2
    Last Post: 27-04-2008, 01:29 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,057,607.46850 seconds with 17 queries