Stop Mouse
Solutions > Javascript Tricks > Stop Mouse
Status: Stable.
Maintainer: Caveman.
Downloads: None.
Here is a simple script for disabling the right mouse click. Try it here on this page.
Here's the script. Cut and paste this to code.embed.stopmouse and then put <embed stopmouse> on any page you want to protect.
<code>
<script language="JavaScript">
<!>>
document.onmousedown = checkClick
if (document.layers){
document.captureEvents(Event.MOUSEDOWN)
}
function checkClick(ev) {
if (navigator.appName == "Netscape"){
if (ev.which != 1) {
alert("Right click has been disabled.")
return false
}
}
else{
if (event.button != 1){
alert("Right click has been disabled.")
return false
}
}
}
>>>
</script>
</code>

