Joe,
I tried it but it does not work. I am using frames, could that be the cause ?
Cas
Sent by Joe Goldsmith on 07/27/2002 08:25:22 PM:
Whee, I finally found a way to disable right-click to protect my code and I share it with you. Works in both .HTM and .FWX. I place it in a .txt file and call it using <%=FILETOSTR('disablerightclick.txt')%> just after teh body tag.
Enjoy
Joe
************************
code before body
...
<BODY>
<script language=JavaScript>
<!--
var message="Right-Click Disabled";
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>
...
code after script