Using JavaScript, Populate checkboxes on drop-down list change from a text file
<p>I have a drop-down list called rcc and some checkbox groups. Here's the HTML code for it.</p>

<pre><code>&lt;select id="rcc" name="rcc"&gt;
    &lt;option value="Select Your Name"&gt;Select Your Name&lt;/option&gt;
    &lt;option value="p1"&gt;Person 1/option&gt;
    &lt;option value="p2"&gt;Person 2&lt;/option&gt;
    &lt;option value="p3"&gt;Person 3&lt;/option&gt;                    
&lt;/select&gt;

&lt;input type="checkbox" name="time1[]" value="8:00am"/&gt;8:00am
&lt;input type="checkbox" name="time1[]" value="8:20am"/&gt;8:20am
&lt;input type="checkbox" name="time2[]" value="8:40am"/&gt;8:40am
&lt;input type="checkbox" name="time2[]" value="9:00am"/&gt;9:00am
&lt;input type="checkbox" name="time3[]" value="9:20am"/&gt;9:20am
&lt;input type="checkbox" name="time4[]" value="9:40am"/&gt;9:40am
</code></pre>

<p>I also have a text file that I've generated that contains the times that I want to be selected when someone selects a different person on the dropdown list. For example, if I choose Person 1, I want to open p1times.txt which looks like:</p>

<pre><code>time1
8:00am
time2
8:40am
9:00am
time4
9:40am
</code></pre>

<p>And then run a script that automatically populates the corresponding checkboxes on the page. I was thinking of looping through the text file, but I'm not sure how the logic would work. Any help would be great :).</p>
