Update select list depending on another list
<p>I've been looking around here for a time now, but I didn't really found what I'm needing.</p>

<p>I've a dropdown with some teachers in it. The second list should contain the courses he/she teaches.</p>

<p>So, a little example:</p>

<p>Mr X teaches maths and biology.
Mrs Y teaches maths</p>

<p>If X is selected in the first list, the second list should contain maths and biology. If Y is selected, the list should only contain maths.</p>

<p>The PHP part, HTML, CSS, is not the issue, it's only about the 'refreshing/updating' of the second list.</p>

<pre><code>&lt;select name="lecturer_id" id="lecturer_id"&gt;
    &lt;option value="22"&gt;X&lt;/option&gt;
    &lt;option value="30"&gt;Y&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>I'm looking for a very simple solution, because my knowledge of javascript is poor. So that's why I prefer a jQuery solution.</p>

<p>--
update</p>

<p>The data is comming from a database. My application currently generates the follow HTML:
<a href="http://pastebin.com/9rEWKAkF" rel="nofollow">http://pastebin.com/9rEWKAkF</a></p>

<p>The two lists, lecturer_id and coure_id are dynamicly generatrd with the information in my database. The list I want to update is the second one, course_id. I hope this makes it more clear.</p>
