Q. Photo security

Put this code between your <head></head> commands:

<SCRIPT language="JavaScript">
<!--
var sorry="Sorry, right-click is disabled."

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(sorry);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(sorry);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</SCRIPT>

There is a catch however.  This code only works in Internet Explorer (Netscape doesn't support any sort of right-click disabling code).

--------------------------
Answer:- Put this code between your <head></head> commands:

<SCRIPT language="JavaScript">
<!--
var sorry="Sorry, right-click is disabled."

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(sorry);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(sorry);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</SCRIPT>

There is a catch however.  This code only works in Internet Explorer (Netscape doesn't support any sort of right-click disabling code).

Related Questions