You have a name on the form tag. That is superfluous and will not be of any use to you.
Code:
<form name="form1">
Your inline onchange event needs double quotes around it.
Code:
<select name='field1' onChange="set_time_hour(this,'field2')">
You've renamed the function property from field to initialfield, so you need to make that change to the same variable at the start of the statement too.
Also where you have "form1", that is not a reference to a named field. What that actually is, is a reference to the "form" property that naturally exists on all form fields, which references the form that the field is in.
Code:
initialfield.form1.elements[nextfield].selectedIndex = ...
Bookmarks