title: How to get out output of a html into textarea using ajax
body: <p>I am developing a tool which send emails using exchange.
  I have a classic asp page which has a textarea and a textbox control.</p>
  
  <p>In the textbox control user will input ORDER NO. On the getfocus event of textarea, textarea should get the content. The content I want to fill is from a HTML page which is order acknowledgement which user sends to the customer.</p>
  
  <p>I am able to fill single line but not the whole order acknowledgement report into the textarea.</p>
  
  <p>I need to know how to do this usig AJAX.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
      function getrpt()
      {
          xmlhttp = new XMLHttpRequest();
          xmlhttp.onreadystatechange = function() {
              if (this.readyState == 4 &amp;&amp; this.status == 200) {
                  var flname=this.responseText;
                  document.getElementById('txtarea').innerHTML=flname;
              }
          };
  
          xmlhttp.open('GET','SalesOrder.asp',true);
          xmlhttp.send();
          return false;
      }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;a href="" onclick="return getrpt();"&gt;get&lt;/a&gt;
  
  &lt;textarea name="emBody" rows="10" COLS="55" id="txtarea"&gt;&lt;/textarea&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>