Results 1 to 13 of 13

Thread: Disable right click?

  1. #1

    Thread Starter
    Addicted Member rinoaheartilly's Avatar
    Join Date
    Oct 2001
    Location
    Cymru
    Posts
    204

    Disable right click?

    Whats the HTML to disable the right click function? People keep stealing my graphics.



  2. #2

    Thread Starter
    Addicted Member rinoaheartilly's Avatar
    Join Date
    Oct 2001
    Location
    Cymru
    Posts
    204
    Is there HTML for this:

    Code:
    <script name='Javascript'>
    <!--
    function right( val ) {
      if (navigator.appName == 'Netscape' && (val.which == 3 || val.which == 2))
        return false;
      else if (navigator.appName == 'Microsoft Internet Explorer' && 
              (event.button == 2 || event.button == 3)) {
        alert("If you want to buy an item, use the left mouse button :)");
        return false;
      }
      return true;
    }
    document.onmousedown = right;
    document.onmouseup = right;
    if (document.layers) window.captureEvents(Event.MOUSEDOWN);
    if (document.layers) window.captureEvents(Event.MOUSEUP);
    window.onmousedown = right;
    window.onmouseup = right;
    //-->
    </script>
    I'm not allowed to use Java on this page



  3. #3
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    This one needs to be in a FAQ - too bad we're all too lazy to write one.

    Anyway - there's no 100% foolproof way of stopping people from stealing your graphics - IMHO, most ways of making this more difficult are so trivially beaten they are not worth implementing.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  4. #4

    Thread Starter
    Addicted Member rinoaheartilly's Avatar
    Join Date
    Oct 2001
    Location
    Cymru
    Posts
    204
    Yeah, I know that, but not everyone knows how to. I keep getting e-mails that i'm exceeding my bandwidth limit, because people are using my images.



  5. #5
    scoutt
    Guest
    you can stop them from doing that with a .htaccess file.

    and why can't you use javascript? and if html could do that then we wouldn't need java or javascript anymore.

    for the .htaccess file look into rewritemode.

    http://httpd.apache.org/docs/misc/rewriteguide.html

    and scroll down to "Blocked Inline-Images"

    if you can't use javascript and you can't use .htaccess files I would move to another server as the one you have sucks.

    Originally posted by rinoaheartilly
    Yeah, I know that, but not everyone knows how to. I keep getting e-mails that i'm exceeding my bandwidth limit, because people are using my images.
    and that is totally wrong. if the user is making a page and using you image on a link in thier site then they will know how to click on View -> source and get the url of that image. plus just 2 cliks of my keyboard and I can by-pass your right click.

  6. #6
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Originally posted by rinoaheartilly
    Yeah, I know that, but not everyone knows how to. I keep getting e-mails that i'm exceeding my bandwidth limit, because people are using my images.
    This sounds like people are linking to your pictures, not necessarily saving them. In that case, do what Scoutt is suggesting.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  7. #7

    Thread Starter
    Addicted Member rinoaheartilly's Avatar
    Join Date
    Oct 2001
    Location
    Cymru
    Posts
    204
    I know, I can get past them too, just right click and press enter at the same time. I just wanna put people off, if they're that desperate for my pictures then they'll get them anyway



  8. #8
    scoutt
    Guest
    true but with that .htaccess file they can't link to them from outside your site. which is what is taking your bandwidth

  9. #9

    Thread Starter
    Addicted Member rinoaheartilly's Avatar
    Join Date
    Oct 2001
    Location
    Cymru
    Posts
    204
    Yeah, I'm taking a look now.

    It's for my guild, on neopets, and we aren't allowed to use Java, because people are usign it to create fake loginpages, so that they can steal other people's accounts.



  10. #10
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    A link on different techniques to discourage or slow the lifting on images from a web page.

    http://www.wildlifephoto.net/digital/copyright1.html
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  11. #11
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Periodically change the file names of all your pictures and correct the links - then put some offensive or disgusting images as the original file names...
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  12. #12

    Thread Starter
    Addicted Member rinoaheartilly's Avatar
    Join Date
    Oct 2001
    Location
    Cymru
    Posts
    204
    Thank you guys *mwah*s all around



  13. #13
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    Originally posted by rinoaheartilly
    Yeah, I'm taking a look now.

    It's for my guild, on neopets, and we aren't allowed to use Java, because people are usign it to create fake loginpages, so that they can steal other people's accounts.
    JavaScript and Java are two seperate things. Javascript is client side and therefore would not be banned from your server as your server does not run it wherease Java is server side and could easily be banned from use.

    -Matt
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

Posting Permissions

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



Click Here to Expand Forum to Full Width