471,066 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

TextArea insert text in specific column


I am trying to insert text in a text area. I need to insert one set of
values on the left side of the text area and have corresponding values
on the left side of the text area in an even column.
How do I specify which column in a text area to insert text?
document.textform.textarea.col[10].value == "put it here"
If not possible, then can I insert text left aligned then insert text
right aligned on the same row?
Lloyd

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
2 3104
Lloyd wrote:
I am trying to insert text in a text area. I need to insert one set of
values on the left side of the text area and have corresponding values
on the left side of the text area in an even column.
How do I specify which column in a text area to insert text?
document.textform.textarea.col[10].value == "put it here"
If not possible, then can I insert text left aligned then insert text
right aligned on the same row?
Lloyd

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Textarea does not have rows and colums. It is continious text with line
breaks that depend on the width of textarea element.
See how close this comes to whatever you are trying to do:
www.vladdy.net/demos/textareainsertion.html

--
Vladdy
http://www.klproductions.com
Jul 23 '05 #2
Thanks for the information, I hadnt considered that.
There is a way to set bookmarks using the createTextRange method, which
I would imagine is what you did in your example. However I solved the
problem by counting the number of characters in the first insertion and
then adding the appropriate spaces with respect to the total number of
cols in the textarea.
Thanks
Lloyd

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Csaba Gabor | last post: by
5 posts views Thread by yawnmoth | last post: by
8 posts views Thread by yerk5 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.