.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Javascript >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Disable right click with a message

Posted By:nishithraj       Posted Date: November 30, 2009    Points: 10    Category: Javascript    URL: http://www.dotnetspark.com  
 

Disable right click with a message. Many time for the security reason we need to disable right click on the browser.

For that here is a code in Java script. It works well with IE and Netscape browsers. But it doesn't work with opera browser. So kindly take care while using the same code for opera.

 

Here the explanation of the code is we are passing the mouse events to the function rightclickhandler. Here it will validate. If it is right click it will return false. Also we need to disable the context menu here.


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend