Disabling right click menu using javascript Enhanced Version
This is an enhanced version of how to disable right click menu from a webpage.
Simple just copy and paste this code
<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
- Words Validation with Javascript
- Context Right Click Menu Using Javascript
- Avoid direct access to a file in php enhanced version
- Get browser version and details using javascript
- Check password strength using javascript
- Simple Ajax with PHP click tracker

How to make this work for FF?
Hello,
This will work fine both in IE and FF…please test it once..thanks….OR get back with your concerns…..