TextArea insert text in specific column

Discussion in 'Javascript' started by Lloyd, Sep 20, 2004.

  1. Lloyd

    Lloyd Guest

    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!
     
    Lloyd, Sep 20, 2004
    #1
    1. Advertising

  2. Lloyd

    Vladdy Guest

    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
     
    Vladdy, Sep 21, 2004
    #2
    1. Advertising

  3. Lloyd

    Lloyd Guest

    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!
     
    Lloyd, Sep 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick Csucsai

    how to insert text into middle of textarea

    Rick Csucsai, Jun 21, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    283
    Harolds
    Jun 24, 2005
  2. Gordan

    insert text in textarea

    Gordan, Sep 2, 2003, in forum: Javascript
    Replies:
    0
    Views:
    102
    Gordan
    Sep 2, 2003
  3. Max
    Replies:
    6
    Views:
    358
    max zen
    Oct 31, 2003
  4. Paul Gorodyansky
    Replies:
    7
    Views:
    234
    Martin Honnen
    Feb 6, 2005
  5. cyber0ne
    Replies:
    0
    Views:
    136
    cyber0ne
    Apr 29, 2005
Loading...

Share This Page