Java Script click scripts - FORUMI


[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 11
FORUMI » RRETH PC » Programe » Java Script click scripts (Sreipt)
Java Script click scripts
ksdardaniaDate: Shtunde, 2011-04-23, 7:33 AM | Message # 1
Privat
Group: Administrators
Messages: 4
Awards: 0
Reputation: 12
Status: Offline
1. No text selection and no right click scripts
<script type="text/javascript">
//Disable select-text script (IE4+, NS6+)
function disableselect(e)
{
return false
}

function reEnable()
{
return true
}

//if IE4+
document.onselectstart = new Function ("return false")

//if NS6+
if (window.sidebar)
{
document.onmousedown = disableselect
document.onclick = reEnable
}
</script>

<script type="text/javascript">
//Disable right click script
//It works for both firefox and internet explorer
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;}

document.oncontextmenu=new Function("return false")
</script>

2. Basic No-Right-Click Script
<script language="Javascript1.2">

// © 2003 CodeLifter.com
// Source: CodeLifter.com
// Do not remove this header

// Set the message for the alert box
am = "This function is disabled!";

// do not edit below this line
// ===========================
bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
if (bNS && e.which > 1){
alert(am)
return false
} else if (bIE && (event.button >1)) {
alert(am)
return false;
}
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;

</script>

3.No right click
<SCRIPT language=JavaScript>
<!-- http://www.spacegun.co.uk -->
var message = "function disabled";
function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;
</SCRIPT>

 
ksdardaniaDate: Shtunde, 2011-04-23, 7:36 AM | Message # 2
Privat
Group: Administrators
Messages: 4
Awards: 0
Reputation: 12
Status: Offline
4
<script language=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;}

document.oncontextmenu=new Function("return false")
// -->
</script>

 
FORUMI » RRETH PC » Programe » Java Script click scripts (Sreipt)
Page 1 of 11
Search: