textarea's understanding linebreaks
Hello,
I'm working on a messaging system and I have a textarea that has some text where I do:
var text = window.document.message.reply.value;
to get the text,
but when the other person receives the message it is all on ONE line - it doesn't recognize line-breaks at all.
A second problem arises when I manually enter in line breaks "\n" and whatever else, and the message shows up fine, except the reply button will not work - there seems to be an error in the javascript because of the linebreaks - i imagine it happens because each line of the javascript is ended with text, instead of double quotes and a semicolon.
Any help would be appreciated,
Thanks!
David
I'm working on a messaging system and I have a textarea that has some text where I do:
var text = window.document.message.reply.value;
to get the text,
but when the other person receives the message it is all on ONE line - it doesn't recognize line-breaks at all.
A second problem arises when I manually enter in line breaks "\n" and whatever else, and the message shows up fine, except the reply button will not work - there seems to be an error in the javascript because of the linebreaks - i imagine it happens because each line of the javascript is ended with text, instead of double quotes and a semicolon.
Any help would be appreciated,
Thanks!
David
Aikon3390
July 22,