Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Textarea challenge: caret pos, resultant text

Reply
Thread Tools

Textarea challenge: caret pos, resultant text

 
 
Csaba Gabor
Guest
Posts: n/a
 
      04-04-2006
I would like to know, please, with Firefox/Mozilla where the caret
position is within a textarea (column, line) and also the text as the
user is seeing it.

Note, I am not looking for the easy textarea.selectionStart /
textarea.selectionEnd pair. That tells me where I am within the text,
and not within the textarea (actually, even that isn't robust because
suppose the user has made the selection by dragging to the left -
there's currently no way to get the sense of direction from the
textarea's selection - but we can assume no selection for now (ie.
selectionStart==selectionEnd)). Also, "text as the user is seeing it"
means that I'd like to know where FF/Mozilla is putting the line
breaks.

Thanks for any tips,
Csaba Gabor from Vienna

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
resultant text height Keith G Hicks ASP .Net 0 02-14-2008 05:11 PM
How to set caret position to end of textarea? R. Kangas Javascript 0 01-26-2006 03:21 PM
How to get the exact caret position in the TextArea HTML control vasu Javascript 0 08-04-2005 06:51 AM
Insert a string into the text of textarea. Caret? IE question Paul Gorodyansky Javascript 7 02-06-2005 12:14 PM
How do I get the caret position in a textarea? torch Javascript 3 06-20-2004 12:13 PM



Advertisments