Page 1 of 1

holding carriage returns and newlines in a textarea

Posted: Sat May 07, 2005 4:24 pm
by clem_c_rock
Hello,

I'm having problem w/ a textarea. I lose the newlines and carriage returns in a textarea when I refresh the page from another frameset, I lose all the newlines and carriage returns and the text is combined on one line.

I've tried using the nl2br() function but, when the page is refreshed by another frameset, it replaces the newlines w/ <br />.

any ideas how to overcome this problem?

Thanks for your help.

Clem C.

Posted: Sat May 07, 2005 6:19 pm
by Skara
post your code. sounds like a bug to me. I can't see it just doing that for the hell of it.

Posted: Sat May 07, 2005 8:57 pm
by Chris Corbyn
What are you using to print the text into the text area (the value="" or the HTML between the <textarea></textarea> tags)?

Post some code to save us guessing ;-)

Posted: Sun May 08, 2005 8:35 pm
by clem_c_rock
Here's more details on what I'm trying to do. I'm working on an email program that consist of 2 frames - 1 we'll call the address frame and one we'll call the mail frame.

When the user hits a submit button on the address frame, it reloads the mail frame and adds the chosen addresses in the "Recipient" textfield.

If there is text in the address frame textarea it will lose it's formatting and put all text on one line.

I've tried throwing the textarea text from the mail frame to a hidden field in the address frame and then back to the mail frame via javascript but it still didn't work.

Does this make sense?