title: Javascript Newline Character Throwing Error
body: <p>I am having trouble getting some data from a textbox using javascript. What I am trying to do is take the value from a textbox and put it in an alert and copy it. Here is the code that I currently have:</p>
  
  <pre><code>var copyString = "Date: &lt;%= TXT_Details_DateReq.Text %&gt;;
  window.prompt('Press CTRL+C, then ENTER\n\nNOTE: SAVE ANY CHANGES BEFORE COPYING TEXT!', copyString); return false;
  </code></pre>
  
  <p>So this code works perfectly fine if the text in the textbox is just one line. But if the text in the textbox has multiple lines such as:</p>
  
  <pre><code>"This is one line
  here is a second line"
  </code></pre>
  
  <p>The code will throw the error <code>Uncaught Syntax Error: Unexpected Token ILLEGAL</code>.
  From what I have researched this throws when there is an illegal character, so I believe it is the CRLF character from the textbox.</p>
  
  <p>Any idea how to fix this?</p>
  
  <p>Thanks.</p>