PDA

View Full Version : Disable Right Click



fobos
02-16-2009, 01:54 AM
hello to everyone,
this is a thread that i wanted posted, because i have read alot of threads and postings about how you cannot disable right click. I know this works because i use it here in iraq and on my website here in the states. I have tried to help people out with this, but sometimes they dont get it working. So here is the code. just place it in the "head" section of your page. Currently it only works in IE and Netscape. Sorry for the people with FF.:(


<script type="text/javascript">
var message="";
//////////////////////
function clickIE() { if (document.all) {(message); return false;}}
function clickNS(e) { if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message); return false;}}}
if (document.layers) { document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS;}
else { document.onmouseup=clickNS; document.oncontextmenu=clickIE;}
</script>

Hope you enjoy:D

jscheuer1
02-16-2009, 04:31 AM
Easily disabled by the user's browser settings in FF. If nothing else, in other browsers, simply disable javascript. Voila!