Disable right mouse click on your site or pictures

This is Perfect for stoping people copying your site content and pictures

If you want to disable the right click mouse button on your pages , please read the following

JavaScript Code to Disable Right Mouse Click

<SCRIPT LANGUAGE=”JavaScript”>
function noRightClick(buttonClicked) {
if (navigator.appName == ‘Netscape’ &&
(buttonClicked.which == 2 || buttonClicked.which == 3))
return false;
else if (navigator.appName == ‘Microsoft Internet Explorer’ &&
(event.button == 3 || event.button == 2)) {
alert(“Your Message Goes Here”);
return false;
}
return true;
}
document.onmousedown=noRightClick;
document.onmouseup=noRightClick;
if (document.layers)
window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=noRightClick;
window.onmouseup=noRightClick;
</script>

Please note

A message will appear when anyone clicks the right mouse button

alert(“Your Message Goes Here”);

To create more lines in the messageĀ  they need to be escaped with a backslash

e.g. alert(“Your \”Message\” Goes Here”);

The script will fail if you do not use the backslash


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image