Blog Details

how to disable right click of web page


                                
                                    <script language="JavaScript">
var message="hello Wama Software right click is Disabled!";

function clickIE_wamasoftware()
{
if (document.all)
{
alert(message);
return false;
}
}
function clickNS_wamasoftware(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=clickNS_wamasoftware;
}
else
{
document.onmouseup=clickNS_wamasoftware;
document.oncontextmenu=clickIE_wamasoftware;
}
document.oncontextmenu=new Function("return false")
</script>
                                    


Categories

Javascript

Latest posts

13.05.14
Implementing CRUD Operations ΒΆ

<ul> <li>Now comes the fun part. We would like t

13.05.14
View

<ol> <li><a href="http://www.yiiframework.com/do

13.05.14
Creating Model

<ol> <li><a href="http://www.yiiframework.com/do

Get Free Quote