Recent Posts

This Post Has Been Viewed 170 Times.

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


VN:F [1.5.7_846]
Rating: 0.0/10 (0 votes cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • De.lirio.us
  • Xerpi

Related posts:

  1. Disabling right click menu using javascript
  2. Context Right Click Menu Using Javascript
  3. Words Validation with Javascript
  4. Add to favorites or bookmarking using javascript in firefox and internet explore [IE]
  5. Check password strength using javascript
  6. LED Display or Scrolling text using javascript
  7. Simple Ajax with PHP click tracker

Write a comment

Spam Protected