Right Click Disable in Internet Explorer, Firefox, Google Chrome and Safari Browser
Right Click Disable in all browser in internet
Note:- Just paste this script into the body part in your html page and enjoy……
<script language=JavaScript>
var message=”Sorry, No Right Click Allowed!!!”;
function clickIE6(){
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=clickIE6;
}
document.oncontextmenu=new Function(“alert(message);return false”)
</script>
Posted by: Posh Web Solutions
I don’t know if this works for Firefox, but it does NOT work on Google Chrome… the Function Disabled alert does come up but users can still see and use the right click menu to save images from the website : (
Val said this on February 15, 2009 at 12:57 pm |
Thanks for this code.This is very useful to protect my hard work from content thefts.
lawrence said this on March 26, 2009 at 5:01 pm |
Thanks a lot for this code. it’s working properly in IE, Firefox and Google Chrome browsers.
Thanks.
Hiren said this on March 26, 2010 at 5:25 am |