DETER PEOPLE FROM EASILY VIEWING SOURCE CODE
Have you ever wondered how to prevent people from looking at
your source code? Well, the following script will disable the
rightclick on your page (this script is provided here with written
permission from the author). When someone right clicks to save an
image off your page, a message will come up letting people know
that your information is copyrighted. This script only works on newer
browsers, and it's not foolproof. If someone really wants something
from your page they can find ways around it, but at least it's a warning
to people who want to take your graphics. Just copy and paste the
following code, and make sure it comes right after your <head> tag:
<script language="JavaScript">
<!--
var popup="Sorry, right-click is disabled.\n\nThis Site Copyright
�2000";
function noway(go) {
if (document.all) {
if (event.button == 2) {
alert(popup);
return false;
}
}
if (document.layers) {
if (go.which == 3) {
alert(popup);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=noway;
// --> </script>