Disabling right click menu using javascript Enhanced Version
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 type="text/javascript"> var message="Sorry this function is disabled." function IE4(){ if(event.button==2){ alert(message) return false}} function NS4(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=NS4} else if(document.all&&!document.getElementById){ document.onmousedown=IE4} document.oncontextmenu=new Function("alert(message);return false") </script>
Some issue was there with the script. It is updated now!!! Working like a charm. Thanks to my visitor BartNKCMO for bringing out the error.
Enjoy!!!!!!!!!!!!!
Disabling right click menu using javascript Enhanced Version,Incoming search terms:
- how to disable right click in jsp (75)
- how to disable right click in jsp page (16)
- javascript disable flash right click (3)
- Tutorial disable right click href using javascript (2)
- how to restrict duplicate menus in jsp page (1)
- javascript disable image right click menu (1)
- javascript flash disable context menu (1)
- javascript:on_menu(); (1)
- js block right click mouse firefox (1)
- js disable right click menu (1)
- remove right click option video javascript (1)
- how to prevent right click in href menu using javascript (1)
- how to paste image and text into block in jsp (1)
- disable paste from mouse menu javascript in jsp (1)
- disable right click jsp (1)
- disable right click on embed tag (1)
- disable right click option in jsp in ie (1)
- disable right click video in html (1)
- disable right click video qwebview (1)
- enable right click on page jsp (1)
- how to make custom menu on right click in jsp (1)
- disable context menu on video fullscreen html javascript (1)
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…..
Can you give an example as to where to insert this coding ? I am pretty new to this coding stuff and could use all the help anyone can give. This is what I have so far .
In regards to this coding I am a newbie and would appreciate if you could tell me where I insert it into the video js coding this is what I have so far
_V_.options.flash.swf = “http://elegant-transport.com/swf/video-js.swf”
tried topaste code but all it did was post a link ugh
Hi, You can paste this code anywhere in your website page. Since this is a javascript usually it should go inside the head tags. But that is only a rule :).
Hello, I deeply apologize for the inconvenience caused. There was some error inside the script which created some extra tags when you copy. Thank you very much for bringing this issue into my notice. The script has been updated now.
Is it possible to disable right click on the full screen video?
Yes it is, inside the embed tag give menu=”false”, it should be something like this
This should do the trick.
Very useful..!!
Very good script, boring is that to spoil all just disable “enable javascript” browser