PDA

View Full Version : Basic Script Codes, (Includes How To Disable Right Clicking)



Always-Think
29-05-2005, 09:16 AM
Basic Script Codes, Mainly For Beginners

The Scripts Below Are Used By Many Sites, Like Even Habbox Use's One Of The Codes Listed Below.


The Basic Disabling Right Click Code (With Popup Message)

<script language=JavaScript>
<!--

//Disable right mouse click Script

var message="Function Disabled";

///////////////////////////////////
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>


Disabling Right Clicking And No Highlighting Script (No Popup Message)

<body bgcolor="#FFFFFF" ondragstart="return false" onselectstart="return false" oncontextmenu="return false">

Very Basic Script Codes, For Your Website. I Will Post More Advanced Scripts Soon.

Hope This Helped :D

Rix
29-05-2005, 09:18 AM
thank you very much

Always-Think
29-05-2005, 09:21 AM
No Problem, Glad To Help.

Mentor
29-05-2005, 12:18 PM
Why do people always want this compleaty usless code? all it does is annoy people, it dosent stop anyone veiwing your source, or anything? plus it can be disabled with the click of a button "/

iRoss
29-05-2005, 12:20 PM
Rofl. Just highlight it and press ctrl + c.

I suppose it looks good on noob sites... >.<

Rofl... OMGZ PHEAR MY HTML SKILLZ I EDITED DA MESSAGE BIT INIT!1

-JT-
29-05-2005, 12:22 PM
omg ross please dont hurt me

zainx
29-05-2005, 12:29 PM
sierk already posted it
http://www.habboxforum.com/showthread.php?t=3725

iRoss
29-05-2005, 12:35 PM
omg ross please dont hurt me

DNT COM NEER ME JAMES IM LEFAL !!!!!1!!1

-JT-
29-05-2005, 12:41 PM
*hides* no one show him where i am :(

iRoss
29-05-2005, 12:44 PM
l-l4l-l4 F()l_l/\l D _l()() :')

And there isn't " This is a pointless post " Option in the poll...

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