I tried to make multiple selection on the dropdown list but it just recognized as the first one that was chosen. Is there anyway to fix it?
var affectedwf = document.translot.affectedwaferid.options[document.translot.affectedwaferid.selectedIndex].value;
Above code is javascript.
<div id="afwid">
<label class="control-label col-sm-4" for="affectedwaferid" style="margin-left: 1px;">Affected Wafer ID :</label>
<div class="col-sm-4">
<p class="form-control-static" style="margin-top: -6px;">
<select class="form-control" id="affectedwaferid" name="affectedwaferid" multiple>
<option value="" selected > Select Quantity</option>
<?php
echo $cbo_oorigsite;
?>
</select>
</p>
</div>
$affwf = array("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25");
for($i=0;$i<count($affwf);$i++) {
$selected = ($affwf[$i] == $affectedwf)? "selected" : "";
$cbo_oorigsite .= "<option value=\"" . $affwf[$i] . "\" " . $selected . ">" . $affwf[$i] . "</option>";
}