retrieve selected value in row using javascript
<p>I've a table with multiple rows, each row has a drop down list. I am new to javascript and is unable to retrieve the selected value from the row. Any idea how can it be done? Thanks in advance.</p>

<p>Code:</p>

<pre><code>function chng_page(serialNum, rowid)
{
    alert(rowid);
    alert(serialNum);
    var select_index = document.getElementById('orderStatus').selectedIndex; 
    //get the value of selected option
    var option_value = document.getElementById('orderStatus').options[select_index].value;

    //redirect with value as a url parameter
    window.location = 'orderStatus.php?serialNum=' + serialNum + '&amp;status=' + option_value;
}
&lt;/script&gt;
</code></pre>

<p>//code for drop down list</p>

<pre><code>&lt;select id="orderStatus" name="orderStatus" onchange="chng_page(&lt;?php echo $serialNum?    &gt;, this.parentNode.parentNode.rowIndex)"&gt;
   &lt;option value="Pending" &lt;?php echo ($status == "Pending") ? ' selected="selected"' : ''; ?&gt;&gt;Pending&lt;/option&gt;
   &lt;option value="Cooking" &lt;?php echo ($status == "Cooking") ? ' selected="selected"' : ''; ?&gt;&gt;Cooking&lt;/option&gt;
   &lt;option value="On The Way" &lt;?php echo ($status == "On The Way") ? ' selected="selected"' : ''; ?&gt;&gt;On The Way&lt;/option&gt;
   &lt;option value="Delivered" &lt;?php echo ($status == "Delivered") ? ' selected="selected"' : ''; ?&gt;&gt;Delivered&lt;/option&gt;   
&lt;/select&gt;
</code></pre>
