View Single Post
  #1  
Old 06-25-2003, 10:37 AM
 
need300z need300z is offline
 

Member
  
Join Date: May 2003
Posts: 16
 

Default disable right click script help

wanted to know where i could throw this into x-cart and have it work correctly


<script>
am = "This function is disabled!";

bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
if (bNS && e.which > 1){
alert(am)
return false
} else if (bIE && (event.button >1)) {
alert(am)
return false;
}
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;

</script>
Reply With Quote