Removing line breaks from the beginning and end of a textarea?

Discussion in 'JavaScript' started by piniyini, Nov 7, 2005.

  1. #1
    [PROBLEM NOW SOLVED]

    I used the php trim function instead and wala!
     
    piniyini, Nov 7, 2005 IP
  2. hnn

    hnn Peon

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can do this in JS too....

    document.form1.textarea.value.trim()
     
    hnn, Nov 7, 2005 IP
    piniyini likes this.
  3. piniyini

    piniyini Well-Known Member

    Messages:
    514
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    170
    #3
    Hey I didn't know that, so thanks ;)
     
    piniyini, Nov 8, 2005 IP