PDA

View Full Version : Stop, Right-Click, Ctrl-C and Selecting/Highlighting!



Recursion
26-02-2006, 05:23 PM
Just put:

<script type="text/javascript">
<!--
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>
<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.oncontext menu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>

into the head tags of your code!

Hope this helps! :D ,
willow135 [Now :.:Numark:.:]

Mentor
26-02-2006, 06:52 PM
You know useing a code like that is actaly ILLGAL in the uk, under the discrimantion agaist people with disabiltys thingimy act "/
Plus Its MASSIVLY annoying, Doesnt work. and Will cause about 90% of vistors to never return dispite the content "/

Eric30
27-02-2006, 02:44 PM
There is one problem :)
You can get past it by disabling javascript :rolleyes:

Rob
27-02-2006, 02:46 PM
There is one problem :)
You can get past it by disabling javascript :rolleyes:
Exactly. And as Mentor said, it's illegal, so why bother? :rolleyes:

Sygon.
27-02-2006, 03:07 PM
Who cares if its illegal, it sucks

Recursion
27-02-2006, 09:24 PM
I have a disabled brother, hes great :)

Mentor
28-02-2006, 12:20 AM
I have a disabled brother, hes great :)
How nice. You may want to notice you brother has very little impact on whether or not the codeing youve posted on this forum is a compleat and utter **** not one in the right mind would even go near with a digitaly rendered barge poll thogh now does it...

Flisker
28-02-2006, 10:23 AM
Mhm :)...

Sygon.
28-02-2006, 11:15 AM
<body oncontextmenu='return false' ondragstart='return false' onselectstart='return false'>

Im typing that by hand so it may be wrong because its from my memory that stops highlighting of what i can remember

Safice
28-02-2006, 11:53 AM
pffft doesn't work

Sygon.
28-02-2006, 11:58 AM
mine or his?

Safice
28-02-2006, 12:47 PM
His...yours i haven't tried, will try it when i have time :)

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