how do I populate 2nd listbox by selecting from 1st listbox using jquery?
<p>I have two questiosn.</p>

<p><strong>1)</strong><br>
I have a list box which gets populated depending on what I select in my 1st drop down.
The data is retrieved using <code>jQuery.get</code>.</p>

<p>The code for generating the list looks like this:</p>

<pre><code>(...)
foreach (DataRow row in dt.Rows)
{
    strList.Append("&lt;option value='" + row["id"] + "'&gt;" + row["enhetsnavn"] + "&lt;/option&gt;");
}
</code></pre>

<p>I append the result to my drop down list with the following code:</p>

<pre><code>var schoolsList = $("#schoolSelect");    

jQuery.get(
    site + "jQueryFunctions.ashx",
    { 
      county: county, schoolType: schoolType, instance: 'getSchoolsByCounty' },
      function(data) {
        schoolsList.append(data);
      }
);
</code></pre>

<p>This works great the first time. The problem is that if I select something new from the 1st ddl, it gets added to the 2nd list thus not replacing existing items.<br>
(the list just keeps getting longer and longer).</p>

<p>How do I replace the list items with the new ones?</p>

<p><strong>2)</strong><br>
If I remember correctly, populating the 2nd drop down list using jQuery will not bind the data. And if it's not bound, I'm not able to retrieve value / data using jQuery.</p>

<p>I think I had to use <code>jQuery.live</code> or something?</p>
