How can I disable right click, Ctrl+C, Ctrl+A in my blog?
Question by Le hoang /

Hi all,
I’m looking for a code that can disable right click, Ctrl C and Ctrl A for my new blog. Please help me.

Browse other questions & answers in the category ; tagged , , ; or ask your own question.

Comments for this Question are closed.

If you are looking for help, please ask a new question.

We will be happy to help you!

Answers (23)
  • Fauzan Al-Rasyid

    To disable “Ctrl + C” put this script.

    function keypressed() {;return false;}document.onkeydown=keypressed;// End  –>

    Then put this script to disable the right click:

    var message=”Function Disabled!”; 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”)

    Put both script before the HEAD tag.

  • Jay

    It will require a few clicks to copy, no matter whatever restrictions you apply.
    you will hardly see text copying disabled on popular sites.
    for example this one.

  • prevention

    Can someone email me the code to disable the highlighting of text in firefox as the code on that website you lot provided only works in exploror

    Email: super_venom1@yahoo.co.uk

  • smartcoder

    You cannot disable control c or control v as this is a operating system functionality that cannot be disabled by the browser.

  • Ladyaec

    Houdini plugin works for disabling select all. I need to disable ctrl I in safari though. 

  • Augadha

    nice job, it worked for me.

  • 7og4nk

    7og4nk.blogspot.com Find the real place for your vacation

  • Guest

    Please give idea to disable Ctr+c.

  • Aibek

    Just found something specifically for WordPress users. A plugin to “PROTECT YOUR BLOG CONTENT FROM THEFT”. Check out WP Protect.

    • professional thesis writers

      This plugin is just perfect! Thanks finding and sharing it

  • Aibek

    I would recommend using the Javascript as well. It would keep your content search engine friendly while disabling the keyboard keys to copy the content.

    • Le Hoang

      Can you guide me please?

    • Aibek

      Basically, if you’re using WordPress then just install the above mentioned WP Protect plugin and follow their instructions on how to activate the pugin.

      If your blog is not running on WordPress, then all you need to do is open one of your template files (header.php, footer php etc.) and copy the Javascript code from following site (see link below) somewhere inside and save it.

      http://www.hypergurl.com/norightclick.html

    • Le Hoang

      Thanks :) but what about disable Ctrl A and Ctrl C? :(

    • Aibek

      If you implement the recommended methods it will disable those
      functionalities.

      Aibek

    • Sana Makeupoholic

      hi , thnx for ur help bt its not working for me i gt this msg when i try to save code before tag 
      Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly. 
      XML error message: Open quote is expected for attribute “{1}” associated with an element type “language”.

    • Sana Makeupoholic

      hi , thnx for ur help bt its not working for me i gt this msg when i try to save code before tag 
      Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly. 
      XML error message: Open quote is expected for attribute “{1}” associated with an element type “language”.
      plsssssssssssss help 

    • Muhammad Asad Ali

      please paste the code in add a gadget

    • Jack Cola

      The only problem with JavaScript is that you can right click, select all, and then click copy. Or, open up the source code, copy the HTML, paste it in an editor such as FrontPage, Dreamweaver, then copy the content from there (after you delete the javascript code). There’s ways around everything.

      You could also possibly print it to PDF, and copy it from that file.

    • Aibek

      good point! )

Load 10 more