title: Reading a text file with jQuery
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1981815/jquery-read-a-text-file">jquery - Read a text file?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to read a local text file, using jQuery. So I try this:</p>
  
  <pre><code>$.get('file_to_read.txt', function(data) {
     do_something_with(data)
  });
  </code></pre>
  
  <p>However, jQuery interprets "file_to_read.txt" as an html file and I get a Javascript error because it's not properly formatted and "do_something_with" does not have its desired effect, since data is not a string.</p>
  
  <p>the jQuery doc says I need to specify the datatype. However, they only list html, xml, json and script as the possible data files; what should I do with a plain txt file I want to load directly into a string?</p>