Forum Moderators: open
I was sent this script which should enable me to disable the mouse right-click function on my webpage
However the advice I was given was to add this script to the <body> section of my webpages HTML code.. I have tried it in several locations in the HTML but it doesnt work at all, in one case I got an error message...something about line12...any ideas how I can use this script?
<script language=JavaScript>
<!--
//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit [dynamicdrive.com...]
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers¦¦(document.getElementById&&!document.all)) {
if (e.which==2¦¦e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN)ocument.onmousedown=clickNS;}
else{document.onmouseup=clickNSocument.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false"
// -->
</script>
I know this wont actually prevent people from veiwing the source of my website etc. but I would like to learn how to implement this stuff anyway..
Thanks in advance
Scaleskin