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

Advertisements

~ by poshwebsolutions on December 15, 2008.

3 Responses to “Right Click Disable in Internet Explorer, Firefox, Google Chrome and Safari Browser”

  1. 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 : (

  2. Thanks for this code.This is very useful to protect my hard work from content thefts.

  3. Thanks a lot for this code. it’s working properly in IE, Firefox and Google Chrome browsers.

    Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: