Mystic_gohan
Founder
Posts : 75
RS points : 26946
your rating by users : 1
Join date : 2009-08-21
|
Subject: disabling right click Sat Sep 19, 2009 9:17 pm |
|
|
document.onmousedown=click var times=0 var times2=10 function click() { if ((event.button==2) || (event.button==3)) { if (times>=1) { bye() } alert("No right clicking!!!!!! don't do it again.."); times++ } } function bye() { alert("I said NO right clicking! click ok to exit LMAO!"); bye() }
add this to HTML page or home page message .
|
|
Mystic_gohan
Founder
Posts : 75
RS points : 26946
your rating by users : 1
Join date : 2009-08-21
|
Subject: Re: disabling right click Thu Sep 24, 2009 4:27 pm |
|
|
if this code is not working try this : - Code:
-
<script language=Javascript> <!--
//Disable right mouse click script //By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive //For full source code, visit http://www.dynamicdrive.com
var message="YOUR MESSAGE 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>
|
|