You spend a lot of time working on graphics for your site, whether it be your logo, any component images or in my case, photographs of a "product". You do not wish for persons to be able to easily right click and take that image, ok you have get arounds such as the floating image tool bar in IE, or you just save the webpage you are visiting then raid the /image directory.
Wouldn't it be great if there was an option within mambo, either as part of the core, or as a mambot, which specifically prevented users from saving your image files ?
What do you think ??
The javascript to do this go as follows..
Code:
<!-- Start of no right click script --><script language="JavaScript">
// No rightclick script.
var message="On this page you can't right-click in Windows?"; // Put your message for the alert box between the quotes.
// Don't edit below!
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>