Jump to content

No Right Click!


aamberker

Recommended Posts

No reason to have it because there are so many ways around itwell heres the script

<script language=JavaScript><!--var message="Sorry, no right-clicking allowed.";function clickIE4(){if (event.button==2){alert(message);return false;}}function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){alert(message);return false;}}}if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}document.oncontextmenu=new Function("alert(message);return false")// --></script>

Link to comment
Share on other sites

Hi aspnetguy and www.mihalism.comThank you for your response. www.mihalism.com, under the code you have mentioned as "function clickIE4" but you see, I am using IE version 6.0 ... wheww!... So? And moreover what you think on the following code?<script language="JavaScript"><!--var message="YOUR MESSAGE!";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>With Warm Regards,Amit ~

Link to comment
Share on other sites

I think that the code is useless because there are at least 10 ways to get the page source and/or graphics used on a web page. One way is File->Save. Another way is to use the Opera browser, which, by default, does not allow Javascript to receive right-clicks.If you don't want someone to have an image, then don't put it online.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...