PDA

View Full Version : Disabling higtligthing



:Woof
26-03-2005, 04:44 PM
i had a website were i coudl disable highliting but i forgotten it :rolleyes:
so im asking you, if you know the code or website to get the code? :)

Homosexual
26-03-2005, 05:25 PM
<script type="text/javascript">

/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase ())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</script>


No select script.

Mentor
26-03-2005, 05:25 PM
i hate that code. all it does is annoy visiters. It rivals the no right click script, in annoyingness and poinlessness. Why would you want it?



<script language="JavaScript1.2">

function disabletext(e){
return false
}

function reEnable(){
return true
}

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

//if the browser is NS6
if (window.sidebar){
document.onmousedown=disabletext
document.onclick=reEnable
}
</script>

Homosexual
26-03-2005, 05:27 PM
.....



And? ...

:Woof
26-03-2005, 05:32 PM
rofl, i dont need it now :) just no right clicking will do

Homosexual
26-03-2005, 05:33 PM
You need no right click?


With Alert:


<script language=JavaScript>
<!--
//Disable right mouse click Script
//By Maximus ([email protected]) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="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>


No - Alert:


<script language=JavaScript>
<!--
//Disable right click script III- By Renigade ([email protected])
//For full source code, visit http://www.dynamicdrive.com
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.oncontext menu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>

:Woof
26-03-2005, 05:34 PM
i already had it :l also that aler is longer then what i have :)

Homosexual
26-03-2005, 05:39 PM
Ok =p Well, worth a try.

:Woof
26-03-2005, 05:45 PM
lol, thanks anyway

Homosexual
26-03-2005, 05:46 PM
Np Woof. =]

:Blob
26-03-2005, 05:50 PM
If you have left clicking website, I frogot the left handed one :(

Want to hide these adverts? Register an account for free!