Jquery Populate dropdown from other
<p>I am populating drowpdown from another dropdown value. Everything is fine for the first time but when i again change the first dropdown the previous values are still showing in second dropdown. Following code i am using to populate second dropdown!!</p>

<pre><code>&lt;select id="NextSession" name="NextSession"&gt;
&lt;option value="1"&gt;Coffee&lt;/option&gt;
&lt;option value="2"&gt;Tea&lt;/option&gt;
&lt;/select&gt;

&lt;select id="NextSectionId" name="NextSectionId"&gt;
&lt;option&gt;&lt;option&gt;
&lt;/select&gt;

$("#NextSession").blur(function() {
$("#NextSectionId").load("/GetData/" + $("#NextSession").val());
});
</code></pre>

<p>Here is my php code:</p>

<pre><code>$UniqueId=$_GET['UniqueId'];
$query2="select ClassName,SectionName,SectionId from class,section where class.ClassId=section.ClassId and class.ClassStatus='Active' and section.SectionStatus='Active' and class.Session='$UniqueId' order by ClassName";
$check2=mysql_query($query2);
while($row2=mysql_fetch_array($check2))
{
$SelectClassName=$row2['ClassName'];
$SelectSectionName=$row2['SectionName'];
$SelectSectionId=$row2['SectionId'];
echo "&lt;option value=\"$SelectSectionId\"&gt;$SelectClassName $SelectSectionName&lt;/option&gt;";
}
</code></pre>

<p>Please tell me what is the problem!!</p>

<p>Here is the live example!!</p>

<p>myraipur.com/test/test.php</p>

<p>select any option in first dropdown, choose from second...then go for first and the 2nd dropdown remains as it is!!! </p>
