[RESOLVED] JavaScript : Determine Start and End of Selection

wxdqz

New Member
Ok, so I've got another question ... I now (thanks to these forums) found out how to only accept selected text from a particular textarea. Now how do I figure out (a) How many characters in the selection starts from the first character of the textarea, and (b) How many characters in the selection ends from the first character of the textarea (so I can use setSelectionRange() or something like that to include tags and other needed parts together)?

Here's the page I'm working on:

<!-- m --><a class="postlink" href="http://elvenbelief.brinkster.net/html%20editor/text%20editor.asp">http://elvenbelief.brinkster.net/html%2 ... editor.asp</a><!-- m -->
 
Top