PDA

View Full Version : No select-text script help



LordVoldemort
08-10-2005, 04:01 PM
Hi, I tried out your no select-text script (http://dynamicdrive.com/dynamicindex9/noselect.htm), and it works pretty well. Too well, in fact. Users can't select text inside a textarea field when I want them to! Could someone please modify the script so my users can select text in ALL textarea fields? Thanks a lot!

jscheuer1
08-10-2005, 04:40 PM
http://www.dynamicdrive.com/forums/showpost.php?p=11951&postcount=2

Twey
08-10-2005, 05:08 PM
Well, I use FF1.0.6, and this script doesn't work at all. In fact, once I've selected some text, it stops me deselecting it! I have to select some more text to deselect the first lot.

jscheuer1
08-10-2005, 05:31 PM
Twey,

The original demo of the script is like that too but doesn't work with paragraphs or anchor tags in FF. At least you can select text in the text boxes and areas, not elsewhere except, as we all know FF can override this easily enough. Relatively few people use FF though and I can tell from the OP's post, they don't.

Twey
08-10-2005, 05:50 PM
But it says it works with FF :-\
It does seem to work on <span> and <strong>.

jscheuer1
08-10-2005, 07:10 PM
The original script did not work on paragraphs or links in Mozilla because it concatenated the excludes array to a string and then tested if the tag name was in that string. Well, if 'input' is in the string, 'p' certainly is as well. Likewise for 'textarea' and the 'a' tag.

On another tack, it didn't exclude anything in IE, as no attempt was made to do so.