View Full Version : right click disable???

04-23-2007, 03:17 PM
I have a couple of images that i want to put on to my website, but they belong to someone else. They have asked if there is any way to stop people being able to take them. I think its a pretty pointless excersise. Any ideas.

04-23-2007, 03:31 PM
completly pointless

just because the right button is disabled it doesnt mean its protected

the user already has the image on his machine anyway.

waste of time and effort

04-23-2007, 06:34 PM
Indeed, it is completely pointless not only will the images be on the machine, without right click theres always the Print Screen button.. but if you still want it then

<script language=JavaScript>
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document. onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontext menu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->

Not my code, found it for a friend, but I've tested it myself on IE and Firefox and it does work. On IE I get the ActiveX message though, which means if they do not allow it to run it will not work. I don't quite know how you'd get past that.

d a v e
04-23-2007, 07:35 PM
and if you turn of js in firfefox it's easy too ;)

04-23-2007, 07:41 PM
Caoctane. You shouldnt encourage such behavior

please dont use that

its as cheesy as javascript snowflake effect or rotating envelope indicating an email link

its the furry dice of web development

04-24-2007, 01:10 PM
KSimmons, unfortunately, by putting it on the web, is *has* to be downloaded to the client machine in order for them to view it. If they see it on their monitor, it's has already been downloaded to their machine.