Enable / Disable Right Click Script
Sometime i really no idea why so many webmasters using disable right click to protect their own content. Here are disable right click script i found from web
<script language="JavaScript"> <!-- //edit this message to say what you want 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;} document.oncontextmenu=new Function("return false") // --> </script>
Please visit below site also
1) http://www.dynamicdrive.com/dynamicindex9/noright.htm
2) http://www.users.totalise.co.uk/~bigoleg/javascript/javascript_disable_right_click.html
Right click is mean less, because this is so easy to enable it back. Just copy following script and put into address bar of the browser. Right click will be enable again
javascript:void(document.oncontextmenu=null)
Even i do not have a script on hand, i also can “CTRL + U” or click View-> Page Source in Firefox to view the source code, ya it may be can stop some newbies to copy image but it is just no point to do it, this is so easy to hack.
- Java Core Technology - Java RegEx, Java XML, Java I/O, Java Misc
- J2EE Frameworks - Hibernate, Spring 2.5, Spring MVC, Struts 1.x, Struts 2.x
- Build Tools - Maven, Archiva
- Unit Test - jUnit, TestNG
- Client Scripts - jQuery