SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    script/code to disable the right-click on those images?

    What code could I use in a image tag to script/code to disable the right-click on those images, but not disable images on the whole site.
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not going to be very effective since images are downloaded into local cache or if JS is disabled, but with that said:

    http://www.dynamicdrive.com/dynamicindex9/noright.htm
    Ryan Butler

    Midwest Web Design

  3. #3
    Cha, Cha, Cha!!! Gamermk's Avatar
    Join Date
    Aug 2005
    Posts
    604
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not to mention the usability guys would have a hay day with this one. Disabling right-click on images is bad practice and will only confuse your users rather than block others from stealing your images. (After all, Print Screen > paste in Photoshop is still going to take your image.)
    People don't read ads. They read what interests them,
    and sometimes that happens to be an ad.
    TrulyBored.com | TankingTips.com

  4. #4
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why people insist on disabling right click is a mystery to me. If you don't want people to take your images then don't publish them on the web. Right clicking and saving isn't the only way to save an image and if people want to take your images then they will and it's possible in more than one way.

    I use right click in a page for reloading so find it irritating if right click has been disabled so I'd suggest spending more time creating an accessible, usable site than trying to annoy your users.

  5. #5
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeh, anti right click scripts are one of those things that just really annoy me. It doesn't do anything to protect the images / content, and just ends up annoying people.

    My advice would be not to bother. Its a waste of time, makes the site less accessible, more annoying and less useable.

  6. #6
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It won't work so don't bother. If the image can be seen on a browser then it can be stolen. As people have said all it does is interfere with peoples' mouse functionality not protect your images.

    Also - if you use Opera these scripts don't even disable right-click at all.

    If you want to protect images for an artist or photographer for instance then your best bet is to either use watermarks (not infallible) or use a low quality version that people won't want to steal and give them a high quality version once they've paid for it.
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  7. #7
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys. I'll pass this information along to the person who asked the question of me. Honest, it wasn't my idea!!!
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  8. #8
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,349
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paulcj2
    I'll pass this information along to the person who asked the question of me. Honest, it wasn't my idea!!!
    I'm glad I'm not the only one who keeps getting asked this


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
  •