The script below will disable the right click for the entire page. I have not tested it on browsers earlier than NS6 or IE5.
Another method is to break apart your images so the user only gets part of the image when they right click.
function disableRightClick(btnClick)
{
if (navigator.appName == "Netscape" && btnClick.which == 3) // check for netscape and right click
{
alert(ErrMsg);
return false;
}
else if (navigator.appName =="Microsoft Internet Explorer" && event.button == 2) // check for IE and Right Click
{
alert(ErrMsg);
return false;
}
}
document.onmousedown = disableRightClick;
</script> Eric
Starting GA/AL Focus User Group (FUSE) in Atlanta. See IBI website for usergroup info or contact me at eric.searing@wcom.com.
My personal opinion is that if you are going to disable the right click then you might as well put a custom menu there instead.
A lot of people will be very annoyed that you have disabled the right click and some will try harder to get the images and as mentioned before, the image is already in the users temporary internet files.
bah, don't do it. its nothing but anoying. i can understand you don't want people taking your pics, but to tell you the truth, wrighting that on the page would probly bo a better job then taking away right clicking.
you can also get them by viewing the sorce and going to the file by itself. the only actual way to stop it, is breaking up your pics, like esearing said.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.