Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

disable right click script help

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #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
  #2  
Old 06-25-2003, 01:06 PM
 
need300z need300z is offline
 

Member
  
Join Date: May 2003
Posts: 16
 

Default

bump'dy bump
Reply With Quote
  #3  
Old 06-25-2003, 10:50 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Patience is a virtue

put it in customer/home.tpl and wrap it within {literal}{/literal} tags
__________________
ex x-cart guru
Reply With Quote
  #4  
Old 06-26-2003, 07:58 AM
 
need300z need300z is offline
 

Member
  
Join Date: May 2003
Posts: 16
 

Default

thanks a bunch.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:11 PM.

   

 
X-Cart forums © 2001-2020