Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 2

How can I override the browser's right-click settings?



I was wondering if you could please help me as I would greatly appreciate it. I am really in a jam...

Could you please tell me the code able to BLOCK RIGHT CLICK so people can not see/view resources....

I can't thank you enough in advance...

Best to you,


Edited by Guest
Changed subject to question.
Link to comment

Recommended Posts

  • 0

I figured out how to get rid of the annoying Alert message. Just inject this header code:

<script language=JavaScript> var message=""; 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; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("return false") </script>

You are very welcome ;)

Edited by Mr_Bubz
Initial Revision
Link to comment
This topic is now closed to further replies.
  • Create New...