title: open relative text file javascript
body: <p>How can I read a text file located in relative path of my site using javascript?</p>
  
  <p>This is what I been trying to do and it says access denied:</p>
  
  <pre><code>this.load = function(path){
      if(root == null){
          root = path;
      }
  
      var client = new XMLHttpRequest();
  
      client.open('GET', "assets/myTextFile.txt");
      client.onreadystatechange = function() {
          alert(client.responseText);
      };
  
      client.send();
  
  };
  </code></pre>