Top » JAVASCRIPTS » DISABLE CLICKS AND TEXT SELECTS If you find this page useful
please make a secure donation
My Account  |  Cart Contents  |  Checkout   
Javascript Category --> EVENT  DESCRIPTION - RUN CODE

AD
AD


This is the Code View for Disable Clicks and Text Selects :

Go Get The Code Now - See The Code Run

<html>
<head>
<!--
This file retrieved from the JS-Examples archives
http://www.js-examples.com
1000s of free ready to use scripts, tutorials, forums.
Author: Miahsoft - http://www.convea.com/
-->
<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==1||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")

function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>

</head>
<body>
The mouse select and clicks should now not be working.
<BR><center><a href='http://www.js-examples.com'>JS-Examples.com</a></center>
</body>
</html>



This script has not yet been rated -- be the first...

Author Name:Miahsoft  [web site
Date Submitted:February, 2002
Times Viewed:17,523
Runs in IE:Yes
Runs in NS:Yes
Category List:
EVENT
Key Words:
disable click select