PDA

View Full Version : mouse protect



pokemon
October 13th, 2006, 06:52 AM
This script will disable right mouse click on your website so that no one can steal your graphics.When anyone right click on your site he/she will be shown a message that "items on this page are protected".

Here's the code:-


<script>
var message="Items On This Page Are Protected!";document.oncontextmenu=Function("alert(message);return false");if (document.all) document.onselectstart=new Function ("alert(message);return false");else document.onmousedown=new Function ("alert(message);return false");
</script>

SinoMan
October 13th, 2006, 09:11 AM
This script is just freaking stupid. I mean, come on, prevent graphic stealing by adding some client side scripting? Nonsense. Tools->Page Info and you are done. Or just the classical View->Page Source.

And if anything, one can use telnet and view the URL of your graphics anyway.

alien23
February 5th, 2007, 09:59 AM
This script will disable right mouse click on your website so that no one can steal your graphics.When anyone right click on your site he/she will be shown a message that "items on this page are protected".

Here's the code:-


<script>
var message="Items On This Page Are Protected!";document.oncontextmenu=Function("alert(message);return false");if (document.all) document.onselectstart=new Function ("alert(message);return false");else document.onmousedown=new Function ("alert(message);return false");
</script>

All these scripts are for beginners and while studying web designing and basic scripts and all, these looks beautiful..that's all