A Javascript Code to Disable Right Click for Both Firefox and Internet Explorer
You can protect your webpage from being copied or hide your source code for some reason to internet users by disabling the right click button of the mouse. You can disable the right click using the following java script code. It works for both firefox and internet explorer. Just copy and paste inside the “body” tag;
<script language=”JavaScript”>
<!–
var message=”";
///////////////////////////////////
function clickIE(){if (document.all)
{(message);return false;}}function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}document.oncontextmenu=new Function(”return false”)
// –>
</script>
Gauss Seidel Power Flow Simulation Program in PHP and MySQL »
Filed in: 










