Code: Select all
<form name="myform">
<select multiple="multiple" name="DrpEmployee" style="width: 173px">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
</select>
<input type="submit" name="submit" value="submit" onclick="return Validate(this.form)" />
</form>
Code: Select all
function Validate(frm)
{
var count = 0
for (var i=0, len=frm.DrpEmployee.options.length; i<len; i++)
{
if (frm.DrpEmployee.options[i].selected)
count++;
}
the problem is i also want to access the DrpEmployee in php . can you specify the code to access the DrpEmployee selected items