Javascripts > Javascript Alerts > No Right Click PLUS
Script Title: No Right Click PLUS
Description: This script will block BOTH I.E. and Netscape visitors from right clicking on a webpage and then will pop up an alret displaying whatever message you want. It also has the option to close the window if you choose.
Example: Available
Copy the following code into your <HEAD></HEAD> tags.<script type="text/javascript"> <!-- var message="You can NOT right click here"; // Your no right click message here var closeWin="0"; // Do you want to close window after message (1 for yes 0 for no) // JavaScript by Dave Lauderdale // Published at: www.digi-dl.com function IE(e) { if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert(message); if(closeWin=="1") self.close(); return false; } } function NS(e) { if (document.layers || (document.getElementById && !document.all)) { if (e.which==2 || e.which==3) { alert(message); if(closeWin=="1") self.close(); return false; } } } document.onmousedown=IE;document.onmouseup=NS;document.oncontextmenu=new Function("return false"); //--> </script>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email