Ticker

6/recent/ticker-posts

Disable Right Click, Copy, Select Text, View Source Code

 


How to Disable Right-Clicking

<script type='text/javascript'> 
//<![CDATA[ 
var message="NoRightClicking is allowed in our website"; 
function arpianDisableClick() { 
if (document.all) { 
alert(message); //Remove this line if you don't want alert message 
return false; 
} 
} 
function arpianNoRightClick(e) { 
if (document.layers||(document.getElementById&&!document.all)) { 
if (e.which==2||e.which==3) { 
alert(message); //Remove this line if you don't want alert message 
return false;} 
} 
} 
if (document.layers) { 
document.captureEvents(Event.MOUSEDOWN); 
document.onmousedown=arpianNoRightClick; 
} else{ 
document.onmouseup=arpianNoRightClick; 
document.oncontextmenu=arpianDisableClick; 
} 
document.oncontextmenu=new Function("return false") 
//]]></script>

Post a Comment

0 Comments