Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Textarea in IE8 Newline issue

I'm making a cross-browser form, which requires a textarea. This textarea receives data by two ways: - Sending an Ajax call to the server and returning data - User inputted data

http://jsfiddle.net/garrettwong/x3KSP/

I'm having an issue on IE8 where the textarea text is not formatted (newlines not being read), where as in Chrome, the same code, nicely formats the textarea. I'm hoping to use a solely JavaScript solution if possible, but I'm not sure where to go from here.

like image 409
Garrett Avatar asked Dec 06 '22 14:12

Garrett


1 Answers

Why are you using text()? Set the value using val().

New lines are normally \n\r.

like image 172
epascarello Avatar answered Dec 27 '22 05:12

epascarello