Practical PC
Stripe

Reviews
Web Building Guides
Computing Guides
Opinion
Downloads
About Practical PC


 

 
Sections
Getting Started
For the absolute novice.
 
Web Building software
The tools of the trade.
 
Design Tips
How to make your Web site look great
 
Web Building scripts
Things that make your Web site dazzle.

Web Bulding Guides
 PPC> Web building> Scripts  

No Right Click

How many times have you wished that folks wouldn't be able to just filch nice graphics off your site, or read the source code? We present a script that, while it won't stop the most determined thieves, it will put them off for a while.

It's very short, and very simple:

<script language="Javascript1.2"> 

<!--
var ppcmymessage = "That won't work here, I'm afraid";

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
}

function ppcrtclickcheck(keyp){

if (document.layers && keyp.which != 1) {
alert(ppcmymessage);
return false;
}


if (document.all && event.button != 1) { 
alert(ppcmymessage);
return false;
}
}

document.onmousedown = ppcrtclickcheck
//-->
</script>

You can change the message at the variable "ppcmymessage" to anything you like. It doesn't have to be "That won't work here, I'm afraid". To see it in action, and how to use it, just click here.

Enjoy!


 

David Dorn


 
counter