Dear All,
In response to David Dawson's earlier message about the possibility of using
a JavaScript to provide basic 'front-line' protection for your images, try
using the following:
<!-- This section should be pasted into the 'Head' section of your HTML -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function right(e) {
var msg = "Sorry, you don't have permission to download images from this
site. To obtain permission, please contact the Webmaster.";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg);
return false;
}
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg);
return false;
}
else return true;
}
function trap() {
if(document.images)
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown = right;
document.images[i].onmouseup = right;
}
// End -->
</SCRIPT>
This is basically the script that runs the function. To make it work on your
page, you should paste the following inside the <Body> tags of your HTML -
onLoad="trap()"
If you would like to change the text that is displayed, simply edit the
following line inside the 'Head' section:
var msg = "Sorry, you don't have permission to download images from this
site. To obtain permission, please contact the Webmaster.";
While David is right that this won't protect your images entirely, it will
at least allow you to let people know that you don't want them to download
them.
I hope this is useful,
Regards,
Nick Poole
ICT Adviser
Resource: The Council for Museums, Archives and Libraries
19-29 Woburn Place
London
WC1H 0LU
Tel 020 7273 8733
Website: http://www.resource.gov.uk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|