Russ - please post this agin
my3cents
Posts: 1,411
Russ,
Would you please post that bit of code that protects against right clicking and copying graphics?
Thanks in advance
Would you please post that bit of code that protects against right clicking and copying graphics?
Thanks in advance
0
Comments
<script language=JavaScript>
<!--
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>
Note, that anyone can disable script processing for their page and still use the right click method.
<< <i>Note, that anyone can disable script processing for their page and still use the right click method. >>
There are also a lot of ways around the script...
Why do you want it?
If you want to protect a picture, just put a watermark with your name across it, so anyone using it will be giving credit to you. Just make sure you put the watermark where it can not be easily photoshopped out.
<< <i>There are also a lot of ways around the script... >>
It is a good deterrent as most people do not know how to get around it. I didn't either without resorting to searching my temp folder, and I am a software engineer lol. That is, until Russ posted an ez mouse click solution.