Results 1 to 5 of 5

Thread: How to disable copy pasting or printing of images/texts from website?

  1. #1
    Join Date
    Jan 2012
    Posts
    64

    How to disable copy pasting or printing of images/texts from website?

    Hi, I am a student and developing my own website ! I want to know how can I protect my images or texts from being copy pasted? I want good privacy for my website and don’t want my images to leak out on the internet! If you can please include the HTML code here! Right now I am working on the Dreamweaver CS3! Your help would be appreciated! Thanks!

  2. #2
    Join Date
    May 2011
    Posts
    393

    Re: How to disable copy pasting or printing of images/texts from website?

    Yes, this has always been the problems with low security websites that its data is easily available as this can be copy and pasted by the users! To prevent others from copying your text use the following code in your <Head> tag:

    <script type="text/JavaScript">
    function killCopy(a)
    {return false
    }
    function reEnable()
    {return true
    }
    document.onselectstart=new Function ("return false")
    </script>

    This will only help you to prevent you text from being copy pasted, I don’t have code for Images! Sorry for inconvenience! i will post it here as soon as possible!

  3. #3
    Join Date
    Jul 2011
    Posts
    397

    Re: How to disable copy pasting or printing of images/texts from website?

    No matter what you do to prevent users from copying the text content there will always be another chance to sneak in to your private data! You can use Snipping tools available in the Windows 7 to save the photo or you can always use print screen option if you older version of windows operating system! You will just need to use Paint that will help you to trim out the unnecessary content and get your desired part of the page! If you are trying to save the text by writing a code then keep this mind that if someone who really wants your text content he can write it down if this is his only aim! So writing code for text content is not helping you!

  4. #4
    Join Date
    Jul 2011
    Posts
    321

    Re: How to disable copy pasting or printing of images/texts from website?

    Yeah I agree with the above user as one can also manually write down the text from your website! Not just a text a user can steal your entire source code of the webpage by going to the “view source code” option in the menu of the browser! User can find the desired text from there by clicking “ctrl + F”! so the outcome is you can’t stop anyone from stealing anything from your webpage as he will always find another way if you close one!

  5. #5
    Join Date
    May 2011
    Posts
    393

    Re: How to disable copy pasting or printing of images/texts from website?

    Here, I have got the code for preventing images from being copy pasted! There is an option in Opera and Internet Explorer for disabling the right click! Add this code to your existing code , it is called as “no right click script”:

    <script type="text/JavaScript">
    var msg="NoRightClicking";
    function defeatIE()
    {
    if (document.all) {(msg);return false;}
    }
    function defeatNS(e) {if
    (document.layers||(document.getElementB
    {
    if (e.which==2||e.which==3) {(msg);return false;}}}
    if (document.layers)
    {
    document.captureEvents(Event.MOUSEDOWN
    else{document.onmouseup=defeatNS;
    document.oncontextmenu=new Function("return false")
    }
    </script>

    You can put this code anywhere in the <body> but for better understanding and reading of the code put it at the end of <body> tag that is before</body>. For disabling the right click on the images use the following code:

    <script language="JavaScript">
    <!--
    function noway(go) { if
    (document.all) { if (event.button == 2) { alert(popup); return false; } } if (document.layers)
    { if (go.which == 3) { alert(popup); return false; } } } if (document.layers)
    { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=noway;
    // -->

Similar Threads

  1. Replies: 4
    Last Post: 26-03-2012, 06:40 PM
  2. Pasting images from Firefox to Word creates multiples
    By scampowl in forum Windows Software
    Replies: 5
    Last Post: 03-06-2011, 11:39 PM
  3. Issue copy/pasting tasks between projects
    By Engreeks1 in forum Microsoft Project
    Replies: 1
    Last Post: 01-05-2011, 11:30 AM
  4. Insufficient Privileges Error while Copy and Pasting Files
    By Dewei in forum Hardware Peripherals
    Replies: 6
    Last Post: 30-05-2010, 06:26 AM
  5. Block the copy pasting in textbox
    By Dolsy_bendal in forum Software Development
    Replies: 3
    Last Post: 01-12-2009, 10:56 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,711,691,940.62830 seconds with 17 queries