Possible Duplicate:
The .val() of a textarea doesn't take new lines into account
I have a text area when i type a message in the text area with newlines and get the value back from the text area the newlines are not preserved and the text is written as one line. how do i get the newlines from the text area?I am using IE 9 and Mozilla, Opera, Safari
var message = $(".chatpaneltext textarea").attr("value");