Subject: How to disable right click in html Thu May 06, 2010 2:02 pm
How to disable right click in HTML and easy way to do
tripy Guest
Subject: Re: How to disable right click in html Thu May 06, 2010 2:03 pm
There is no way to have it on every browser in a way than an user cannot access it. You'd better forget about it.
You want to avoid someone seeing your site source code, then don't put it on the web. Or generate it as a big jpg image. (yurk...)
Knight13 Guest
Subject: Re: How to disable right click in html Thu May 06, 2010 2:04 pm
All that does is piss people off, i hate it when i go to a website and i can not right click to use the back button or the reload button, i agree with tripy just forget about it you will be better off.
beta Guest
Subject: Re: How to disable right click in html Thu May 06, 2010 2:05 pm
What is it that you want to do? I mean your goal might be solved in another way if you tell us what it is you want to accomplish by removing right clicking.
Marik Guest
Subject: Re: How to disable right click in html Thu May 06, 2010 2:06 pm
Well putting this on your page will work:
<SCRIPT LANGUAGE="JavaScript"> var message="Function Disabled!"; /////////////////////////////////// function clickIE() {if (document.all) {alert(message);return false;}} function clickNS(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=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}