Subscribe to My Blog

Disable Right Click in Your Website/Blog

Posted by Junaid Sunday, September 5, 2010




In my earlier post it is quiet clear that disabling right click can ruin your web page. But if you still want to disable right click on you website/blog, then following is the simplest method for it.





Use the script below so 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. Copy
and paste the following code, and make sure it comes right after your
<HEAD> tag:




<script language="JavaScript">
// distributed by http://klustter.blogspot.com <!-- var popup="Sorry, right-click
is disabled.\n\n"; 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>




Here is an example of website with right click disabled. Click Here For The Website 


In my next post, I'll show you how to enable right click option on such websites.

One Response to "Disable Right Click in Your Website/Blog"

Leave a Reply

Popular Posts