PDA

View Full Version : setSelectionRange()


pthompson2002
09-20-2002, 10:40 AM
Can anyone give me any info on this object? I want to select an individual character from some user inputed text in a textbox. However, I can only seem to get it to work if the text is predifined, i.e there is a value of the textbox.

Anyone got an idead? I need it to work for NS6

Bosko
09-20-2002, 03:13 PM
Take a look at http://www.din.or.jp/~hagi3/JavaScript/JSTips/Mozilla/Samples/NSHTMLInputElement.htm and http://codingforums.com/showthread.php?s=&threadid=5841 for some examples,its very easy.

pthompson2002
09-23-2002, 10:05 AM
thanks for those Bosko,

Is there anyway such a procedure can work within a textarea?

jkd
09-23-2002, 11:58 AM
I don't believe setSelectionRange() worked on <textarea>'s until sometime past Moz 0.94 (NS6.2).