I am passing data from a textarea to a div with javascript. The problem is the div is ignoring line breaks.
document.getElementById('layer1').innerHTML = document.getElementById('reply').value.replace("\n", "<br /><br />");
e.g... i entered this in the textarea
test1
test5
test6
the result was in the div
test1
test5 test6
the div is completely ignoring the line breaks. any idea why?