?
Solved

Images from being saved

Posted on 2003-02-24
9
Medium Priority
?
208 Views
Last Modified: 2010-05-18
Is there a way to have Images on a Web page so that people can't right click on them and save them?
0
Comment
Question by:mmbc_voltron
9 Comments
 
LVL 2

Accepted Solution

by:
weeezl earned 80 total points
ID: 8009683
You can do it by adding a javascript to your page. This disables the right mouse click only for images and leaves it intact for other areas of the page. You can also change the alert message in the script or remove it altogether.

Here's the code:

<script language="JavaScript1.2">

/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

var clickmessage="Right click disabled on images!"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>

Referenced:
http://www.dynamicdrive.com/dynamicindex9/noright2.htm
0
 
LVL 30

Expert Comment

by:weed
ID: 8010053
You can disable right clicks, but users will still be able to drag images to their desktop, view the source and download the images directly, or even take a screenshot. The bottom line is that if you dont want people taking your images, dont put them on the net.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 8010777
It's so easy to get around a no-right-click script it's laughable. Frankly, if I want your images I'll save your page and get the location from the code, then I'll grab them directly.

I wouldn't waste the time to even put the nrc script there. All it does is annoy people who use the right click to do things like PRINT or open a link in a new window.

And the nrc script doesn't do anything for you legally -- it's not establishing your ownership of the images. To do that, you need to put a copyright line on the image. If they're yours (not clipart), you should do that. Or put a digital watermark on them. Or both.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:weeezl
ID: 8010815
hey, it's always possible to steal stuff if you want to, but you can make it more difficult. Most users would be stopped by the javascript. Advanced or determined users wouldn't be...

I mean, this forum IS for experts right? ;)
0
 
LVL 30

Expert Comment

by:weed
ID: 8011248
Personally, i dont use the contextual menu to grab images anyway. So its certainly not going to stop me, nor is it going to stop anyone else who drags and drops images from the browser to the desktop.
0
 

Expert Comment

by:siphilp
ID: 8016139
You can deter image thiefs by putting a nice water image through it.  So no matter how they get your image in the end they will still have a nice water image to get rid of.  This could be your URL, name anything :-)

I know it's not a great solution.  I have found that it does work, however it all depends on what your images are of.
0
 
LVL 2

Expert Comment

by:weeezl
ID: 8018065
By the way, I DID answer the initial question....

"Is there a way to have Images on a Web page so that people can't right click on them and save them?"

Do these threads ever get closed?
0
 
LVL 30

Expert Comment

by:weed
ID: 8018124
Relax. Technically, yes, you answered the question but there's more to it than that.
0
 

Expert Comment

by:dryad
ID: 8042009
make a flash image in flash 6 or shockwave. :P
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question