By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,472 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,472 IT Pros & Developers. It's quick & easy.

TextArea insert text in specific column

P: n/a

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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.