Right Click Disabled on Page and Popup Menu Appear Automatically.
Right Click Disabled on Blogger Post and when some one right click then popup menu appear for warning or other text which you want to show.
Now you click on this post and test it, How this code work. Simply Right click on the text.
…
Right Click Disabled on Page Html Code Given Below:
<script>
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
}
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
</script>
—————————————————————————–
Another Code for Totally Disabled the Right Click:
<script language="javascript">
document.onmousedown=disableclick;
status="Right Click Disabled";
Function disableclick(event)
{
if(event.button==2)
{
alert(status);
return false;
}
}
</script>
</div>
<body oncontextmenu="return false">
...
</body>
-----------------------------------------------------