How to pass value from two select to one onchange function?
<p>Hi i have multiple dynamic dropdowns. The values of the ahead dropdown is dependent on the previous dropdown value. I have a dropdown in which the value is dependent on the values from two dropdowns. The code for dropdowns.</p>

<pre><code>&lt;select name="batch" id="batch-list" onChange="getSubject(this.value);" class="form-control" required&gt;
  &lt;option value=""&gt;Select Batch&lt;/option&gt;
&lt;/select&gt;

&lt;select name="semester" id="semester-list" class="form-control" required&gt;
  &lt;option value=""&gt;Select Semester&lt;/option&gt;
&lt;/select&gt;

//The value of the below select are dependent on the values from batch and semester 
&lt;select name="subject" id="subject-list" class="form-control" required&gt;
  &lt;option value=""&gt;Select Semester&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>The onchange function for single value:-</p>

<pre><code>function getSubject(val) {
$.ajax({
type: "POST",
url: "dropdown.php",
data:'batch_id='+val,
success: function(data){
    $("#subject-list").html(data);
}
});
</code></pre>

<p>}</p>

<p>The above onchange function only takes value from batch how do i pass the value for semester in the fuction via ajax.</p>