title: Populating drop down menu from comma delimited text file
body: <p>I'm trying to populate a <code>HTML</code> select list from a text file located on the server.  The file is setup like this:</p>
  
  <pre><code>ttt1111,John Doe
  xxx2222,Jane Doe
  etc....
  </code></pre>
  
  <p>The first column would be the <code>&lt;option value=""&gt;</code> and the second would be the displayed text.  I read in the file and then split it into an array by each line.  I'm having trouble trying to figure out the code to create the correct append line using the two values.</p>
  
  <p>I'm extremely new to this so any help at all is appreciated, even just links to examples.  This is my code so far, but it just assigns the entire line to the value and the text output.</p>
  
  <pre><code>function PopulateSupervisorList() {
      var Suplist=[];
      var SupervisorFile="text.txt";
      var DDL = $("#iSupervisor");
      var SuperID=[];
      $.get(SupervisorFile,function(data) {
          Suplist = data.responseText.split("\n");
          for (var i=0; i &lt; Suplist.length; i++) {
              DDL.append("&lt;option value='" + SuperID[i] + "'&gt;" + Suplist[i] + "&lt;/option&gt;")
          }   
      });
  }
  </code></pre>