title: Javascript read a file
body: <p>Hi I was hoping that maybe someone can help me out:</p>
  
  <p>I created a bash script that connects to my free webhost via FTP and uploads a file.txt
  into the home directory. What I'm looking to do is to read this text and display it on my index.html site. </p>
  
  <p>Looking around I seen the following script:</p>
  
  <pre><code>jQuery.get('path/to/file/on/server.txt', null, function(data, status) {
      // your file contents are in 'data'
  });
  </code></pre>
  
  <p>how would I output 'data'?</p>
  
  <p>Or is there any other method someone can recommend?</p>
  
  <p>thank you.</p>