No mouse Right click/Disable Right mouse click

This free right click disable javascript will disable the right click popup. Also it will protect your web site content, resources from being copied. This free javascript code can be used in any html page.

Features

  • This javascript function will disable the right mouse click.
  • This will stop users from easily stealing your site content using view source.
  • You can add the message as you wish.
  • Just copy the code into your page and enjoy the effect.

Preview

Right click is disabled in this page. Test it by right clicking anywhere in this page.

Downloads

Javascript
<!--Script by hscripts.com-->
<script type="text/javascript">
<!-- Edit the message as your wish -->
var msg_box ="Right click disabled in this page"; function dis_rightclickIE(){

if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))
alert(msg_box)
}
function dis_rightclickNS(e){
if ((document.layers||document.getElementById&&!document.all) && (e.which==2||e.which==3))
{
alert(msg_box)
return false;
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=dis_rightclickNS;
}
else if (document.all&&!document.getElementById){
document.onmousedown=dis_rightclickIE;

}
document.oncontextmenu=new Function("alert(msg_box);return false")
</script>
<!-- Script by hscripts.com -->
  • Release Date - 06-04-2007
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to support@hscripts.com

Usage

  • Copy the code to the head tag of your file.
  • To customize your message then make changes in the following line,
  •  var msg_box ="(Add your message here)";
  • This free "no right clicking" JavaScript is compatible with windows IE, firefox and mozilla.

License

Related Scripts

Free Javascript Scripts


Ask Questions

Ask Question