P
Patrick Nolan
I recently had need to use \n in a javascript string.
Firefox really doesn't like it. It says that I have an
unterminated string literal. I can't figure out how to
get around this.
I have a textarea element, and I want to append lines to it.
I tried
someArea.value += someString + "\n";
When I look at the page source, it looks like
someArea.value += someString + "
";
The string someString comes from a TEXT input element on a
form, so it doesn't come with its own \n.
Is there some way to accomplish this?
Firefox really doesn't like it. It says that I have an
unterminated string literal. I can't figure out how to
get around this.
I have a textarea element, and I want to append lines to it.
I tried
someArea.value += someString + "\n";
When I look at the page source, it looks like
someArea.value += someString + "
";
The string someString comes from a TEXT input element on a
form, so it doesn't come with its own \n.
Is there some way to accomplish this?