Friday, August 20, 2010

Script For "NO RIGHT CLICK" for Source on a Website

Script For "NO RIGHT CLICK"

Here is a handy little script which will not only protect your images from right clicking, but your whole page. Remember this only stops some visitors from viewing your source. There are ways around it and if someone really wants to view your source they may find a way. There is another trick below to protect your source code.

This script works best if placed within the head tags of your html.

<script language="JavaScript1.1">
//
 <!-- var debug = true; function
right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which
== 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer'
&& (event.button == 2 || event.button == 3)) { alert('This Page is fully
protected!'); return false; } return true; } document.onmousedown=right; if (document.layers)
window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right; //--></script> 


studiobrains.com
Studiobrains is a dynamic design agency that specializes in delivering high quality, creative solutions in the key areas of advertising, branding, web development & multimedia solutions.

No comments:

Post a Comment