I have an extremely simple script that works fine in Firefox and Opera, but does not work in IE or Safari. The script looks like this.
My form looks like this.
[HTML]<form name="invitems" >
<table>
<tr>
<td>
<select name="CategoryI D" size="1">
<option onClick="autofi ll('','')">&nbs p;</option>
<option onClick="autofi ll('months','20 .00')">Service1 </option>
<option onClick="autofi ll('hours','75. 00')">Service 2</option>
<option onClick="autofi ll('hours','50. 00')">Service 3</option>
</select>
</td>
<td><input type="text" name="Units" size="5" maxlength="10"> </td>
<td><input type="text" name="UnitPrice " size="5" maxlength="10"> </td>
</tr>
</table>
</form>
[/HTML]
Can anyone tell me what I need to do to get this to work in IE/Safari?
Code:
<script language="JavaScript" type="text/javascript">
function autofill(units,uprice) {
invitems.Units.value=units;
invitems.UnitPrice.value=uprice;
}
</script>
[HTML]<form name="invitems" >
<table>
<tr>
<td>
<select name="CategoryI D" size="1">
<option onClick="autofi ll('','')">&nbs p;</option>
<option onClick="autofi ll('months','20 .00')">Service1 </option>
<option onClick="autofi ll('hours','75. 00')">Service 2</option>
<option onClick="autofi ll('hours','50. 00')">Service 3</option>
</select>
</td>
<td><input type="text" name="Units" size="5" maxlength="10"> </td>
<td><input type="text" name="UnitPrice " size="5" maxlength="10"> </td>
</tr>
</table>
</form>
[/HTML]
Can anyone tell me what I need to do to get this to work in IE/Safari?
Comment