title: Read text file into variables with javascript
body: <p>I have a text file located on the server that contains a list of events with their target time.  It looks something like the following:</p>
  
  <pre><code>2012/02/11-10:00:00 EventStart Red
  2012/02/11-10:10:00 EventStop Green
  ...
  </code></pre>
  
  <p>What I need to do is somehow read the text file and based on the current time select the next upcoming event and assign each element for that event to a variable.  So for example if the time is currently 2012.02.11-10:08:00, javascript variables <code>time = '2012/02/11-10:10:00'; title = 'EventStop'; color = 'Green';</code> would be created.</p>
  
  <p>I'm able to read the text file with:</p>
  
  <pre><code>jQuery.get('schedule.txt',function(data){
    alert(data);
  });
  </code></pre>
  
  <p>Just don't know where to go from there, or if that's even the best way to start.  I do have control over the formatting of the text file, so modifying that is an option.</p>