TextArea insert text in specific column

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lloyd

    #1

    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.textfo rm.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!
  • Vladdy

    #2
    Re: TextArea insert text in specific column

    Lloyd wrote:[color=blue]
    > 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.textfo rm.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![/color]

    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:


    --
    Vladdy

    Comment

    • Lloyd

      #3
      Re: TextArea insert text in specific column

      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!

      Comment

      Working...