View Full Version : Need Help

02-10-2011, 05:56 PM
Guys, I am working on a website, I want to restirct viewers from right clicking, copying or selecting the texts on the website... anyone with help?

02-10-2011, 06:00 PM
This is the wrong section for that sort of question.

You want the JavaScript section.

02-10-2011, 07:10 PM
http://www.dynamicdrive.com/dynamicindex9/noright.htm. Don't know about copy and select.

02-11-2011, 12:08 AM
[Moved thread to right section.]

This is a terrible idea. I'm not being critical of you, and many new designers want to do this, but there are many reasons not to do it. Generally, it is because there are always ways around this sort of "security" and it will actually just cause problems for honest visitors. I guarantee that it will make your site worse.

At best you will block the honest visitors from nondestructive behavior (copying a paragraph and emailing it to a friend, or saving an image for personal use) and those that would do these things for bad reasons (such as stealing content for their own webpages) will know how to get around your "security" and it will be useless. Therefore, it will be useless and annoying.

(There are a handful of good reasons for this, and they all include making very complicated web applications where you actually include alternative functionality such as a special context menu. But even then, it is not entirely reliable and only works in certain browsers, and not on all devices. Additionally, in those cases it serves a different purpose, and is not intended for security, and it does not create "security".)

As a general solution, you can position a fixed-position div 100% height/width over the whole screen, with a transparent background. I believe that will, superficially, disable everything you are describing. I don't recommend doing this though.