title: Loading multiline text from database to TextArea
body: <p>I have some multi line text saved in MySql database (VARCHAR 255). When i load it, and process it using standard php function "nl2br", it echoes fine (multi line). But, when i load multi line text from database, make it "nl2br" and then send it to javascript (so it gets displayed in textarea), it won't be displayed! What's wrong?  </p>
  
  <pre><code>echo "&lt;SCRIPT&gt;FillElements('".$subject."','".$text."');&lt;/SCRIPT&gt;";
  </code></pre>
  
  <p>P.S.
  FillElements function:</p>
  
  <pre><code>function FillElements(Sub,Txt)
          {
              document.getElementById('txtSubject').value=Sub;
              document.getElementById('txtMessage').value=Txt;
          }
  </code></pre>