Disable Right Click Option Using JavaScript is playing a vital role to stop copying content and saving imagesHave you ever seen that in some blogs the right click options is disabled and visitors can't copy their content and minimize the risk of copying their content directly. Right click on browser is very significant when a user required to copy some confidential information to their documents but some time people may use it in wrong way so disabling right click option is crucial for preventing contents and images from copying. There are many ways to disable right click option for content and images. But we shall discuss here disabling right click option using JavaScript. It is very easy process, just copy these codes for content and images to save them from copying directly. 


Disable Right Click Option On Images Using JavaScript
Master The Skills Of Disable Right Click Option Using JavaScript


Disable mouse right click option for content using JavaScript 

Go to your blogger dashboard.
Select Layout.
Select Add a Gadget.
Select HTML/JavaScript.
Paste this below code ans click Save.

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


You may replace "Function Disabled" with your own word like "No Right Click".

You May Like This: How To Use Blogger Dashboard.


Disable  mouse   right    click   option  for  images   using JavaScript

As you want to save your content from copying, it also useful to protect your blog or website images for save as option. It is very difficult to prevent people copying content but we have to try our best to stop. So disabling right click option for images using JavaScript is important to protect our blog images too.


Master The Skills Of Disable Right Click Option Using JavaScript


Go to your blogger dashboard.
Select Layout.
Select Add a Gadget.
Select HTML/JavaScript.
Paste this below code for images and click Save.

<script language="JavaScript1.2">
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var clickmessage="Function disabled on images!"
///////////////////////////////////
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
// -->
</script>


You may change "Function Disabled on Images" to your own phrase like "Right Click not Allowed


Conclusion

Disable right click option using JavaScript for images and content in blogger is very necessary to protect your content and images from copying directly. As you know how people steal your content and use again in their own interest. Don't waste time and make your images and content protected using JavaScript for disabling right click option.




w w