|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Custom Solutions How disable right click on ucoz (How to disable it???) |
How disable right click on ucoz |
Paste these codes under <body> or <head> tag of your code:
Code <script language=JavaScript> <!-- var message="Right Clicking 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;}}} 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> But i think this is one of the most annoying javascript codes. Why would you want to do that, it's not useful at all? |
Alex0493, what purpose are you disabling right click for exactly? Most of the functions usable by right-click are also usable by keyboard commands. The script above should work however.
Jack of all trades in development, design, strategy.
Working as a Support Engineer. Been here for 13 years and counting. |
| |||
| |||