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