I just came accross this script while I was going through an old website I had done . Its a java script for Disabling the right click and save option. Its idealy used if U dont want viewers to copy pics from ur website.
<script language=JavaScript>
<!–
//Disable right mouse click Script
//By Gavin (gavinmendes@gmail.com)
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>
If in case it does’nt work . U might want to check the following : 1) make sure the script is in the body of your HTML page, 2) Ideally this script is meant for HTML only ( I dont think it would work well in php, as the scripts might conflict) , The script should not be inside any angle brackets of a tag – example < > .
