I have a simple problem that I just can't seem to figure out. In the code below I get an error (test_str is not defined) because the line defining "var str=" is spread across two lines. After the word "fox" there is a CR LF and I guess my javascript engine in my browser thinks I want a new statement there. Now of course in this example I can simply get rid of the carriage return and put it all on one line to fix it. But my real intent is for a much longer string in some production code which I don't really want to mess with deleting all those CR LF's.
<html>
<head>
<script>
function test_str() {
str = " The quick brown
fox jumped over the log.";
alert(str);
}
</script>
</head>
<body>
<a href='javascript:void(0);' onclick='test_str();'>Test String</a>
</body>
</html>