title: Read contents of text file dynamically
body: <p>I am trying to have HTML page display the values of a text file. If the values of the text file change, then have the HTML page display the updated contents realtime. </p>
  
  <p>Here is what I have, based on a <a href="https://stackoverflow.com/questions/12062674/using-javascript-to-read-and-display-a-txt-file-dynamically">previous post</a>:  </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      setTimeout(read,3000);
  function read(){
  setTimeout(jQuery.get("now.txt",function(data){
  $('#container').html(data);}),1000);
  }
  </code></pre>
  
  <p></p>
  
  <p>I have <code>&lt;div id="container"&gt;&lt;/div&gt;</code> in the body. </p>
  
  <p>I am not getting the page to display any contents. Can someone point out what is wrong?</p>