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.
Why are you using text()
? Set the value using val()
.
New lines are normally \n\r
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With