Disable Right Click in Blogger

by Deineshd on May 9, 2008

This is the cross browser DHTML script from dynamicdrive that prevents default right menu from popping up when right mouse is clicked in the blog.This tool is very useful to different site owners who don’t want to let their site content Copied.This script is provided in two style Alert and non alert . After you use Alert Script if someone Right click then a Message is appeared and if you use non alert then no message is displayed.To setup this tool in your blog Copy the Following code and paste it to your blog by adding a new page element.

Message Alert Script:

<script language=JavaScript><!--

//Disable right mouse click Script//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////function clickIE4(){if (event.button==2){alert(message);return false;}}

function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){alert(message);return false;}}}

if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}

document.oncontextmenu=new Function("alert(message);return false")

// --> </script>

Message nonAlert Script:

<script language=JavaScript><!--

//Disable right click script III- By Renigade (renigade@mediaone.net)//For full source code, visit http://www.dynamicdrive.com

var message="";///////////////////////////////////function clickIE() {if (document.all) {(message);return false;}}function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")// --> </script>

Consider to Subscribe to our RSS feed or Follow us at Twitter or Join our Facebook Fan Page.Enter your Email below to subscribe to our updates via Email.

Enter your email address:

Delivered by FeedBurner

Similar Posts

Powered by Thesis

Thesis Theme

An amazing WordPress Theme, nothing beats the versatility and SEO friendliness of the Thesis framework.

From beginners, to the most advanced WordPress developers, Thesis makes it easy for anyone to customize it.

{ 6 comments… read them below or add one }

Anonymous January 24, 2009 at 4:39 pm

it doesn’t work in IE.

Reply

o-zam March 4, 2009 at 9:29 am

nice info thanks :)

Reply

s4kti March 8, 2009 at 5:48 am

Briliant……many thaks

Reply

Anonymous March 20, 2009 at 9:59 am

it doesn’t work in IE.

Reply

Hey, Gee! May 3, 2009 at 4:31 pm

thx! ;)

Reply

Gallery Cars January 16, 2010 at 6:34 pm

Thanks .. i add to my blog

Reply

Leave a Comment

Previous post:

Next post: