This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

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!!!!!!!!!!!!!


VN:F [1.5.7_846]
Rating: 0.0/10 (0 votes cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)

Related posts:

  1. Disabling right click menu using javascript
  2. Words Validation with Javascript
  3. Context Right Click Menu Using Javascript
  4. Avoid direct access to a file in php enhanced version
  5. Get browser version and details using javascript
  6. Check password strength using javascript
  7. Simple Ajax with PHP click tracker

2 Comments

  1. hai says:

    How to make this work for FF?

    VA:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.5.7_846]
    Rating: 0 (from 0 votes)
  2. admin says:

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

    VN:F [1.5.7_846]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.5.7_846]
    Rating: 0 (from 0 votes)

Leave a Reply

Comments (required)

Spam Protected