How to make images unable to right click and copy

Hi,

I have not been able to figure out how to make images unable to right click and copy in Dreamweaver 4. I thought that it was in the behavior process, but that does not work. Any idea?

Thanks! :confused:

he he, this is even funnier than trying to hide source code – and even easier to get around… 2 words: YOU CAN’T… :smiley: sorry :slight_smile:

It’s impractical but are you looking for something like:

http://www.dynamicdrive.com/dynamicindex9/noright2.htm to stop right click on images.

http://www.dynamicdrive.com/dynamicindex9/noright.htm to stop right clicks on the entire page.

http://www.dynamicdrive.com/dynamicindex9/noright3.htm to stop right clicks on the entire page without an anoying alert box.

Finaly, if you want to stop people from saving your images in IE6, you’ll have to include either a propertary Microsoft tag GALLERYIMG=“no” in your <img> tag, or use the ‘imagetoolbar’ http header (or http-equiv <meta> tags) set to ‘no’. Of course your IE6 visitors will most likley like the fact that you’ve disabled that damn popup thingy!

But, I have to agree with DR_LaRRY_PEpPeR, these are pritty easy to get around and most are very anoying. If you’re that concerend about copyrights look into Digimarc or something simular.

~~Hope This Helps

bstubbs…

This is a perennial question around these forums. Every so often someone will ask it and everyone will laugh to themselves because as LarryPepper said, basically you can’t do it.

Here are several threads on this same topic:
http://www.sitepointforums.com/showthread.php?s=&threadid=35177&highlight=no+AND+right+AND+click

http://www.sitepointforums.com/showthread.php?s=&threadid=32410&highlight=no+AND+right+AND+click

http://www.sitepointforums.com/showthread.php?s=&threadid=30723&highlight=no+AND+right+AND+click

http://www.sitepointforums.com/showthread.php?s=&threadid=29458&highlight=no+AND+right+AND+click

http://www.sitepointforums.com/showthread.php?s=&threadid=20260&highlight=no+AND+right+AND+click

Plus, you will lose a certain percentage of your surfing public.

I, for instance, do not return to pages that have right click disabled. It’s not because of image theft or anything, but I am one of those people that uses the right click alot to do things like go Back a page, Open a link In New Window, etc.

(Heck I still use Ctrl or Shift Insert more often than Ctrl-C and Ctrl-V for cutting and pasting too)

an easier and cleaner solution is just to stamp each pic with a digital watermark.

:o Thanks everyone for the responses on this!~~

bstubbs :smiley:

I wouldn’t recommend this…but you may disable right click all over your page.

here’s the code:

<SCRIPT LANGUAGE=‘JAVASCRIPT’> function right(e) {
if (navigator.appName == ‘Netscape’ &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == ‘Microsoft Internet Explorer’ &&
(event.button == 2 || event.button == 3)) {
alert(‘right click is not allowed’);
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>

rush78,

Thanks very much for that code. This is what the customer of the web site wants, he may change his mind with some complaints, but for now it works great!!

Thanks again,
bstubbs:)

Glad I could help :wink:

cya around

there is a way… then again you would be able to capture the screen but hey we can’t do anything about that…

What you do is this … Create a table and set the image as a background for the cell then place a fully transparent gif in the cell which is the same hight and width as the cell…

Now if you put a php page as the source for the image and don’t allow that page to be called without the displaying page!!! it makes it a bit harder for the visitor to rip the image… It will also make the page a bit slower…

Good luck,
Peanuts

if you add this simple javascrpt which can be found at javascriptsource.com you will not elimiminate the copying of graphics as they will just use a screen gram and save the copied image.

You will never get around this.

Matthew Taylor

i have to agree with mail-benefit.com. this site is a god send.
:alien:
yuri

but i guess a screen capture wouldn’t render the same resolution as the original pic.
it’s a solution…but not the perfect one
there ain’t a way around it…i agree…but this is one thing that could (just could) turn those who wish to copy images away!!

Originally posted by rush78
[B]I wouldn’t recommend this…but you may disable right click all over your page.

here’s the code:

<SCRIPT LANGUAGE=‘JAVASCRIPT’> function right(e) {
if (navigator.appName == ‘Netscape’ &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == ‘Microsoft Internet Explorer’ &&
(event.button == 2 || event.button == 3)) {
alert(‘right click is not allowed’);
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> [/B]

:lol: there is even a way around this…

Try this:

  1. Right click the page (it brings the alert up)
  2. Right click and hold
  3. Left click the OK
  4. Release the left click (but keep holding down the right) – the alert will disappear
  5. Release the right – alert will appear
  6. Left click the OK, and bingo as if by magic the menu appears.

(only tested in IE6)

:smiley:

Let’s not forget. No matter what you do, a perfect version of the image in file form will be in your browser cache for you to pluck out and use however you want. None of the solutions here address the fact that the computer must have a usable unprotected version in the cache to display it in the browser at all. So trying to protect it is kinda stupid…

Originally posted by bstubbs
[B]rush78,

Thanks very much for that code. This is what the customer of the web site wants, he may change his mind with some complaints, but for now it works great!!

Thanks again,
bstubbs:) [/B]

It works, but to what end? You are not stopping anyone from taking your images, so why disable a function in the browser? I don’t understand the logic.

-t

Also if your conserend about bandwith theaft (where the thever is too lazy to save the image to thier own site) you could try something like thiss on Apache: http://www.bignosebird.com/apache/a16.shtml

I be perfectly honnest, I tend to think that the best deturent for image theaft is a little leaglese…

Originally posted by weirdbeardmt
[B]

:lol: there is even a way around this…

Try this:

  1. Right click the page (it brings the alert up)
  2. Right click and hold
  3. Left click the OK
  4. Release the left click (but keep holding down the right) – the alert will disappear
  5. Release the right – alert will appear
  6. Left click the OK, and bingo as if by magic the menu appears.

(only tested in IE6)

:smiley: [/B]

Or just my way:

Use View (or whatever it is called in the English version :), the thingy in which you change the font size as well), to open the source code for the page you are viewing. Then find the url for the picture and type that into your browser window.

That is all there is to it.

well
i guess u should just warn visitors from stealing those pics or copying them without permission.

i remember once someone in this forum (i really don’t recall who) said what’s the point of the internet if not for sharing ideas and resources?
we were then talking about how to protect a source code from being viewed.
!!