Disable right click Browser

Posted by Murugavelmsc under ASP.NET on 2/8/2013 | Points: 10 | Views : 1055 | Status : [Member] | Replies : 3
Experts,

How to disable the right click button to avoid the view source while the disable the javascript in browser
or any other way....

Thanks,
Murugavel S

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Satyapriyanayak on: 2/9/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
<html
<head>

<SCRIPT language="JavaScript">
var message = "function disabled";
function rtclickcheck(keyp)
{
if (navigator.appName == "Netscape" && keyp.which == 3)
{
alert(message); return false;
}
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2)
{
alert(message);
return false;
}
}
document.onmousedown = rtclickcheck;
</SCRIPT>

</head>

</html>

If this post helps you mark it as answer
Thanks

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Murugavelmsc on: 2/9/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

Its ok but i disable the Javascript in the bowsers the above code won't work.

Then wat we do...

Thanks,
Murugavel S

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rimi1289 on: 2/9/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

Its of no use. Even a novice can dig out client side scripts. So please do not waste your time thinking about it. Write good server side codes, so you can hide them. Use AJax or JQuery to fetch data from the server side. Its much faster.

Rimi

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response