SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Hybrid View

  1. #1
    SitePoint Enthusiast Ian's Avatar
    Join Date
    Sep 2000
    Location
    UK - Yorkshire
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To stop people from right clicking on your web pages and lifting your pics use this code
    _______________________________
    <script LANGUAGE="javascript">
    // No rightclick script
    var bN = navigator.appName;
    if (bN=='Microsoft Internet Explorer')
    function click() {
    if (event.button==2) {
    alert('Feature Disabled')
    }
    }
    document.onmousedown=click
    </script>
    ______________________________

    Hope this is useful for someone

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It can't stop them from opening your page source, finding the picture filename, and then saving it.

    Or just turning off their Javascript and then saving it.

    Chris

  3. #3
    SitePoint Enthusiast Ian's Avatar
    Join Date
    Sep 2000
    Location
    UK - Yorkshire
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats true, but it's enough to put off the novice and a large percentage of the population Chris. Besides you don't have to use it if you don't want to!

  4. #4
    Sports Publisher mjames's Avatar
    Join Date
    Jan 2000
    Location
    Charlotte, NC
    Posts
    5,891
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When amateur webmasters try to be "hip" and "advanced" by putting that ridiculous disabling of being able to right click, it really annoys me. I mean, who are they fooling? Anyone who knows anything knows you can just go to View > View Source in IE. If this was really necessary, would any of the web's most popular sites use it?

  5. #5
    SitePoint Member
    Join Date
    Oct 2000
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I always get round this by holding down the right mouse button, pressing enter to dismiss the box and then releasing it.

  6. #6
    SitePoint Enthusiast Ian's Avatar
    Join Date
    Sep 2000
    Location
    UK - Yorkshire
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like I said Marc I was only trying to help those who thought it might be useful, you don't have to use it. Oh and thanks for calling me an "amateur". I wasn't trying to be hip or professional, only helpful, which is the whole point of this forum. If you don't have anything constructive to say - don't bother!

  7. #7
    Skills to Pay the Bills Sparkie's Avatar
    Join Date
    Jul 1999
    Location
    A cave with 47 computers and an internet feed
    Posts
    3,559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let's try to keep the tone a little more civil in here.

    Nobody is calling anyone an amateur, and I believe Marc was just making a broad generalization by saying that the code is not often used on professional sites.

    Ian, I'm certain that your contribution will be most helpful for anyone looking to block a large percentage of visitors who might otherwise steal source code and graphics.
    Thank you for donating the code to our members!

    Sherice Jacob - Web Improvement Expert
    Improve Website Conversions | eBook Covers
    Follow Me on Twitter!

  8. #8
    Kat's Meow Senior ******* WebKat's Avatar
    Join Date
    Jul 1999
    Location
    California USA
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ian, I have dealt with many photographers and I have used an "Image Right Click Disabler" as it gives them a sense of security, although false sense I will admit. Please Note - This disables 'right click' for images only, not entire right click functions such as print & refresh.

    Even though it won't prevent everyone from taking their images, it will at least deter some...and for photographers that is what they feel comfortable with. But not all will agree with me...view "This Thread" or "This One" and you can see how this was discussed before & how SP Members commented on this issue.

    Of course I give photographers the pros & cons about this feature, how it is not fool proof, how you can still access the images if you know how and I emphasize that that the best way to protect their images is to include watermarks. Disabling the right click, whether an image only or the entire page, will most definitely be a limitation...as some may just 'click away' from your site if they are unable to use this function of their browser.

    Ian, our forums are here to discuss all aspects of web design and you will find a wide range of opinions in which not everyone will agree. We pride ourselves to be a learning center for everyone. So we do value your contribution as your code may be just what someone is looking for...
    Dlynn :: SitePoint Senior Advisor ::
    PawPrint Designs by WebKat
    "Dogs come when they're called; Cats take a message and get back to you later." ~ Mary Bly

  9. #9
    Sports Publisher mjames's Avatar
    Join Date
    Jan 2000
    Location
    Charlotte, NC
    Posts
    5,891
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Ian
    Like I said Marc I was only trying to help those who thought it might be useful, you don't have to use it. Oh and thanks for calling me an "amateur". I wasn't trying to be hip or professional, only helpful, which is the whole point of this forum. If you don't have anything constructive to say - don't bother!
    I wasn't directly referring to you in my little rant. When I heard about the right click disabling, I instantly thought of all the amateur sites that try to be "hip and professional". I appologize if this offended you, as it wasn't supposed to

  10. #10
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It serves SOME purpose - your average surfer doesn't necessarily think to find a way around it...it'll deter the petty little thieves out there. So it has some worth...I do agree that it's highly annoying, though.

  11. #11
    SitePoint Enthusiast Ian's Avatar
    Join Date
    Sep 2000
    Location
    UK - Yorkshire
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No offense taken, I was just blowing off some steam (bad day)

  12. #12
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ian,

    From a quick glance, your code only works for IE. I'm sure one of the threads WebKat posted has the code for NN.
    Since others have already mentioned that noRightClicks do not ultimately work, I will only add that at a while back I saw a script at javacripts.com that incorporated dHTML with the noRightClick. Essentially, when you rightClicked, an order form popped up, listing prices for the photographs that were displayed on the page.
    In my opinion, it was the best, and possibly only, valid use for a noRightClick script I had ever seen.
    One final comment: as an individual who is often asked to help people with code, I refuse to do so if there is a noRightClick script in place -- especially since the majority of people who have them in place, usually have cut&paste scripts on their sites.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  13. #13
    Kat's Meow Senior ******* WebKat's Avatar
    Join Date
    Jul 1999
    Location
    California USA
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Vincent Puglia
    ...when you rightClicked, an order form popped up, listing prices for the photographs that were displayed on the page. In my opinion, it was the best, and possibly only, valid use for a noRightClick script I had ever seen.
    Vincent, that is in essence what is done on the photog sites that I do. The pop-up text varies as some photographers don't want their prices online, but do want such messages as 'Copyright Images' or the 'Image Title' while being unable to right-click on images...

    Here is where I found the script for Protecting Images that I mentioned and other information regarding using this option on your website. Including a CGI-Script for Image Protection...

    "Right Click Disabler" for 4.0+ Browsers attempts to prevent users from right-clicking the page and viewing your page source - and any other feature of browser's right click.

    AND to repeat the disclaimers that have been repeated before, "As Described Here" by Martin Web, "Scripts from JavaScript.com" explains how these script are not foolproof - such as won't stop a MAC one-button mouse.

    If this is what you want to have accomplished, try the scripts and decide what is best for your website - just know the limits beforehand...

    Dlynn :: SitePoint Senior Advisor ::
    PawPrint Designs by WebKat
    "Dogs come when they're called; Cats take a message and get back to you later." ~ Mary Bly


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
  •