Disabling right click menu using javascript Enhanced Version
Posted by admin | Posted in JavaScripts, scripts | Posted on 03-06-2009
0
This is an enhanced version of how to disable right click menu from a webpage.
Simple just copy and paste this code
[myAds]
<SCRIPT LANGUAGE="JavaScript"><!-- var message="Sorry this function is disabled." 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}}} function disableselect(e){ return false} function reEnable(){ return true} document.onselectstart=new Function("return false") if(window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable} 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> Enjoy!!!!!!!!!!!!!
Related posts:
- Disabling right click menu using javascript
- Context Right Click Menu Using Javascript
- Words Validation with Javascript
- Add to favorites or bookmarking using javascript in firefox and internet explore [IE]
- Check password strength using javascript
- LED Display or Scrolling text using javascript
- Simple Ajax with PHP click tracker












