I just can't figure it out
The code below was taken from a site I was visiting. I'm not going to say what site, because I don't want to start a web war or something like that, but why disable highlighting the text on a page. It's not like this code works in older browsers, in Opera, or prevent you from just viewing the source. Humm sometimes I think people just put stuff in their web pages to look pimp. Only thing is it makes them look stupid.
<script language="JavaScript1.2">
<
!--
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script
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 language="JavaScript1.2">
<
!--
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script
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>



<< Home