Disabling Right Click in Blogger Blog - Sabahan Kupi Kopi

Latest

Blog | Tech | Software | Linux | ETC

Tuesday, June 28, 2011

Disabling Right Click in Blogger Blog


 Screenshot of Message Alert Script:                     



<script language=JavaScript>
<!--
//edit by kewin

var message="YOUR MESEJ HERE";
///////////////////////////////////
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>



Copy the script above or Download the script here.
Copy the  code and paste it to your blog by adding a new page element
Im sure you know how to use this script.Happy trying...



1 comment:

  1. Excellent idea to disable the right click on blogs.Good sample on how to Fisable the right click in Java script.

    sap support pack stacks

    ReplyDelete

Thanks for taking time to leave a comment and welcome relevant and respectful comments. Comments with Promotional hidden links may be removed.

**Please be aware that all comments made are moderated and SPAM will not be published.
**Comments must relate to the post topic. This blog is here to help people, not for your advertising purposes.