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:
2012/02/11-10:00:00 EventStart Red
2012/02/11-10:10:00 EventStop Green
...
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 time = '2012/02/11-10:10:00'; title = 'EventStop'; color = 'Green';
would be created.
I'm able to read the text file with:
jQuery.get('schedule.txt',function(data){
alert(data);
});
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.