Forum Moderators: open
What i want is basically what this script does, but want it to do only on a selected image, not on the full screen as it does currently.
Any ideas?
Regards
webboy
This is the script.
<script language=JavaScript>
var message="Copyright Colin Palmer";
function click(e) {
if (document.all) {
if (event.button==2¦¦event.button==3) {
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>
Efforts to protect anything on the web are futile. If you really don't want your images stolen, don't put them on the web.
If you really think it is necessary, though, assign your image an ID attribute and when the event occurs check the ID to see if it matches.
Hope that helps!
Happy coding! :)