|
Posted by The Eclectic Electric on 10/30/06 14:24
You can't do that with HTML. To be honest I personally hate sites that
disable right-click - there are many things I like to do with context menus
that I don't think website owners should be attempting to block.
+e
"techfiddle" <renaissance@australiamail.com> wrote in message
news:1162216230.834474.151480@f16g2000cwb.googlegroups.com...
> Disabling the right click and hiding the source code view may be two
> entirely separate issues. I Googled disable right click and
> encountered three separate blocks of source code, none of which; worked
> on my page at http://www.geocities.com/techfiddle//policies.html
>
> I also searched in this group "disable right click" but the entires I
> got were very old, probably not effective any longer.
>
> I remember from the past there was very short snippet of code that
> worked, but now I can't find it. I don't care so much about hiding the
> source code (though that would be cool), as much as protecting my
> images.
>
> During the Googling (Ask, actually), there was a software program I
> could buy for $40 which accomplishes this:
>
> http://www.antssoft.com/htmlprotector/index.htm
>
> So do I need to buy something or is there html that will accomplish
> this?
>
> Thanks!
> Connie
>
> THREE BLOCKS OF SOURCE CODE THAT DID *NOT* WORK:
>
> <PRE>
>
> ______________________________
>
>
> <SCRIPT LANGUAGE="JavaScript1.1">
> <!-- Original: Martin Webb (martin@irt.org) -->
>
> <!-- This script and many more are available free online at -->
> <!-- The JavaScript Source!! http://javascript.internet.com -->
>
> <!-- Begin
> function right(e) {
> if (navigator.appName == 'Netscape' &&
> (e.which == 3 || e.which == 2))
> return false;
> else if (navigator.appName == 'Microsoft Internet Explorer' &&
> (event.button == 2 || event.button == 3)) {
> alert("I'm sorry, The Right click option on your mouse has been
> disabled for the download window pages.");
> return false;
> }
> return true;
> }
>
> document.onmousedown=right;
> document.onmouseup=right;
> if (document.layers) window.captureEvents(Event.MOUSEDOWN);
> if (document.layers) window.captureEvents(Event.MOUSEUP);
> window.onmousedown=right;
> window.onmouseup=right;
> // End -->
> </script>
>
> </head>
>
>
>
> ________________
>
>
> <SCRIPT language=JavaScript>
> <!-- http://www.spacegun.co.uk -->
> var message = "function disabled";
> function rtclickcheck(keyp){ if (navigator.appName == "Netscape" &&
> keyp.which == 3){ alert(message); return false; }
> if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) {
> alert(message); return false; } }
> document.onmousedown = rtclickcheck;
> </SCRIPT>
>
>
> _____________________________
>
>
>
> <SCRIPT>function click() {if (event.button==2) {alert('Ooops...\nRight
> click is disabled!');}}document.onmousedown=click// - -></SCRIPT>
>
>
>
>
> ____________________________
>
> </PRE>
>
[Back to original message]
|