Friday, 4 November 2011

Disable Right Click on your Blog

You have noticed lots of websites don't allow right click to their visitors using right mouse click when pointer is in the blogger area. So here is trick for just the copy below code. This option is very useful for site owners, who want to minimize the copying of their posts. So copy the below code and paste to the blog by adding page element. Go to Dashboard Layout click on New Html Java Script and copy the below code on it. When anyone try to copy of your content. Message shows 'Function Disabled". Through this step you can secure your post. No body can copy your content.

<code Begin...................>

<div dir="ltr" style="text-align: left;" trbidi="on">

<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>

< code....................End>


Don't Forget to Drop your Comment!!!

1 comment:

  1. Great post. You did a good job by sharing the information. Its true in some sites right click does not work. Thanks for the information. I put a copy of the above mentioned code. I will use it and then send you the feedback also.
    electronic signature

    ReplyDelete

Thanks