elmo + actiVe™ moderator
Number of posts : 118 Age : 38 Location : Pinas pride Registration date : 2007-11-18
| Subject: No right click script FF1+ IE5+ Sun Nov 18, 2007 8:51 pm | |
| Description: This is a cross browser DHTML script that will prevent the default right menu from popping up when the right mouse is clicked on the web page. Use it to stop surfers from easily saving your web page, viewing its source, or lifting images off your site when using either IE 4+ or NS 4+. Definitely useful for many site owners... Simply add the following code to the <BODY> section of your web page - Quote :
- <script language=JavaScript>
<!--
//Disable right mouse click Script //By elmo + active w/ mods by peppermints
var message="Function 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> | |
|
emo:tan member
Number of posts : 120 Age : 30 Location : sa bakod ng aming kapit bahay :) Registration date : 2007-11-24
| Subject: Re: No right click script FF1+ IE5+ Sun Nov 25, 2007 10:00 am | |
| is da code working for both ie and ff?? | |
|