Click here to Skip to main content
11,796,631 members (71,138 online)
Click here to Skip to main content
Add your own
alternative version

Javascript hack to disable Right Click and Text Selection

, 22 Sep 2009 CPOL 19.7K 8
Sometimes we have requirement to disable Right Click context menu and Text selection of a web page from the user, so that the user cannot use the right click default context menu and also to disable text selection so that sensitive data could not be copied from the website. To Disable Context Menudo



Compare Revision Minor Date Status Editor
1 - publicly available No 22-Sep-09 18:41 Available Abhishek Sur


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Abhishek Sur
India India
Did you like his post?

Oh, lets go a bit further to know him better.
Visit his Website : to know more about Abhishek.

Abhishek also authored a book on .NET 4.5 Features and recommends you to read it, you will learn a lot from it.

Basically he is from India, who loves to explore the .NET world. He loves to code and in his leisure you always find him talking about technical stuffs.

Presently he is working in WPF, a new foundation to UI development, but mostly he likes to work on architecture and business classes. ASP.NET is one of his strength as well.
Have any problem? Write to him in his Forum.

You can also mail him directly to

Want a Coder like him for your project?
Drop him a mail to

Visit His Blog

Dotnet Tricks and Tips

Dont forget to vote or share your comments about his Writing

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151002.1 | Last Updated 22 Sep 2009
Article Copyright 2009 by Abhishek Sur
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid