View Full Version : Prevent selection

01-02-2012, 01:54 AM

Is there anyway to prevent images, words, divisions, etc from being selected? Also if something is selected is there a way to deselect?


01-02-2012, 04:33 AM
I'm not sure I understand your question.
Can you give an example of what it is that you are trying to do?

01-02-2012, 08:24 PM
Alright, let's say I took my mouse, push down on the left button and drag it across the screen. Everything is now hilighted in blue. Is there a way onmouseup that I could un-hilight these.


01-02-2012, 09:27 PM
No there isn't. Some browsers do have a proprietary call you can make from JavaScript to do it but only if your visiitor enables the option to allow it.

The answer to any "how can I prevent my visitors from doing something" is always no because they can always disable the code you use to attempt to do it because they are the ones in control of everything except your content. Their JavaScript and CSS always overrides yours.