title: How to read from text file and show it as a dropdown (select) in html
body: <p>I have a text file stored in my local which contains the list of usernames that i want to show as a drop down in html page. I need to know how to go about doing this also any piece of code or push in the right direction would be appreciated? P.S I am very new to coding !!</p>
  
  <p>I have already tried loading text files to display as html using the below code </p>
  
  <pre><code>var openFile = function(event) {
  var input = event.target;
  var reader = new FileReader();
  reader.onload = function(){
    var text = reader.result;
    var node = document.getElementById('output');
    node.innerText = text;
    console.log(reader.result.substring(0, 200));
  };
  reader.readAsText(input.files[0]);
  };
  </code></pre>
  
  <p>But this does not serve my purpose.
  I would like a dropdown the options of which are populated from a text file.</p>