How to disable right click and Selecting



This article explains to you how to disable Right Click+Selecting+Printing functions in one code.If you like to add these feature to your website/blog,then follow the steps below.



1.Login to your blogger dashboard--> layout- -> Edit HTML

2.Scroll down to where you see </head> tag .

3.Copy below code and paste it just before the </head> tag .


<script language='JavaScript1.2'>
//Disable Select Text script (IE4+, NS6+) - By all4blogs
//For full source code, visit http://all4blogs.blogspot.com
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
<script language='JavaScript'>curPage=1;
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
</script>


4.Now save your template and you are done.

2 commentaires:

sadat on April 24, 2011 at 3:57 AM said... [Reply]

not working for me :(

all4Blogs on April 25, 2011 at 9:06 AM said... [Reply]

Try again the new code!!

Post a Comment

 

Sponsors

Protected by Copyscape Web Copyright Protection

All For Blogs. Copyright 2011 All Rights Reserved powered by Revolution Church Theme hosted on Blogger