Hi,
is there something wrong with this code?
Num must be the value selected. Consider that this is a dinamic form and i goes from 1 to 10. In this example I considered only one case.
[CODE]
function aaa(){
i=1;
fieldh=’day’ + i + ‘hh’;
num=document.forms[0].getElementById(fieldh).options[document.forms[0].getElementById(fieldh).selectedIndex].value;
}
<form name=”formname” method=”post” action=”file2.php” onSubmit=”return aaa()”>
<select name=”day1pp” id=”day1pp”>
<option value=”00″ selected>00</option>
<option value=”15″>15</option>
<option value=”30″>30</option>
<option value=”45″>45</option>
</select>
<input type=”submit” name=”go” value=”Go!”>
</form>
Thanx!