dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: TextArea new line

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    17

    TextArea new line

    Im trying to make my TextArea read multiple lines to a string

    Hello
    my name
    is Bryan

    in the textArea

    outputs to HellomynameisBryan

    how can I get it to output with line breaks?

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Use \n to create a newline character - also make sure the condenseWhite property is turned off on the textArea.
    Please use [php] or [code] tags, and mark your threads resolved 8)

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    17
    condenseWhite is set to False. I know \n creates a newline. Im not sure how to place it in my actionscript so that when the user presses enter it will insert that line break on the back end. The text in the text area is being sent to the users email client using mailto: when i press enter it starts a new line in the textArea but in the email client it reads without a space

  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Depending on how it's getting transmitted it might be going through any number of other filters in the process - for starters try using double linebreaks (\n\r) - you could also try escaping the text but that may screw up the email even more (escape(string)).
    Please use [php] or [code] tags, and mark your threads resolved 8)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center