I am about to put some of my own photography work on a web site I am designing. How do i prevent users looking at the web site from printing the images
@ray326Mar 28.2004 — #The short answer is, you can't. Whatever you let them see they can print. You can make the image small and/or highly compressed so a print out is low quality but that's about it.
@SamMar 28.2004 — #although, if you just want to disable an image from being printed directly from the webpage (for example a very large/colorful image), you could define a print media, and have that image set to display:none. if you do this however, you should have a way to print the image as an alternative
@NadirMar 28.2004 — #like ray said you can't stop them from printing cos they could print screen etc. but heres a script i used for my site, It stops both right and left click:
@Paul_JrMar 28.2004 — #[i]Originally posted by Nadir [/i]
[B]like ray said you can't stop them from printing cos they could print screen etc. but heres a script i used for my site, It stops both right and left click:
if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 1) { alert(msg1); return false; } else
if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2) { alert(msg2); return false; } return true; }
document.onmousedown = right;
// -->
</SCRIPT> [/B][/QUOTE] No right-click scripts are very annoying, and very useless. I'm pretty sure that if someone comes across your site, and finds out they can't use some feature of their computer, they will leave immediately. Besides, those who really want the images, will get them anyways.