Disable Right Click (Sort Of)

[Total: 1    Average: 3/5]

Don’t want users having easy access to downloading your images (or just right clicking for anything)?

Body Code:

Go ahead - try to right click!
<BR>
<script type=text/javascript>
var message = "You can't click the right mouse!n(unless you click-hold-left&click-right then release-left then release-right)";
function click(e) {
  if (document.all) {
    if (event.button == 2) {
      alert(message);
      return false;
    }
  }
  if (document.layers) {
    if (e.which == 3) {
      alert(message);
	  return false;
    }
  }
}

if (document.layers) {
 document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
</script>

Times Viewed: 4

Leave a Reply

Your email address will not be published. Required fields are marked *