Disable Right Click

Post new topic   Reply to topic

View previous topic View next topic Go down

Disable Right Click

Post by sakthi on Sat Jan 19, 2008 11:18 am

Here i give code for disable the right click

<script language=JavaScript>
<!--

//Disable right mouse click Script
//By Maximus (maximusatnsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

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>

Regards
Sakthi

sakthi
Leader

Posts: 187
Join date: 2007-12-02
Age: 25
Location: Coimbatore

View user profile

Back to top Go down

Re: Disable Right Click

Post by technicalganesh on Fri Jan 25, 2008 10:01 am

Good Stuff

technicalganesh
Leader

Posts: 33
Join date: 2007-12-11
Age: 33
Location: Coimbatore

View user profile

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum