title: How can I import a text file into javascript from an external website using jquery $get()?
body: <p>When the <strong>button</strong> in the following script gets clicked, it should <strong>load</strong> in the contents of the file "<strong><a href="http://tanguay.info/knowsite/data.txt" rel="nofollow noreferrer">http://tanguay.info/knowsite/data.txt</a></strong>" and display it on the screen.</p>
  
  <p><strong>What is the correct syntaxt so that the .get() function retrieves the data from the external website and puts it in #content?</strong></p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head&gt;
          &lt;script type="text/javascript"
          src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
              google.load("jquery", "1.3.2");
              google.setOnLoadCallback(function() {
                  $('#loadButton').click(loadDataFromExernalWebsite);
              });
              function loadDataFromExernalWebsite() {
                  $('#content').html('new content');
                  //$.get("http://tanguay.info/knowsite/data.txt", function(data) { alert(data); }, );
              }
          &lt;/script&gt;
      &lt;/head&gt;
  &lt;body&gt;
      &lt;p&gt;Click the button to load content:&lt;/p&gt;
      &lt;p id="content"&gt;&lt;/p&gt;
      &lt;input id="loadButton" type="button" value="load content"/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>