Hi,
I have a drop down box which a number is selected, i just want that number updated in a textbox
[COLOR=”blue”]<select class=”style9″ name=”cbo<%=wkno&sday%>txt<%=empno%>” id=”cbo<%=wkno&sday%>txt<%=empno%>” onchange = “populateOT(this.value,<%=empno%>);”>
<option> etc etc etc…
</option>
This is the drop down box, so when it is changed it should fire off the populateOT function
[COLOR=”Blue”]<td width = “50px” class=”style7″><input align=”center” class=”style9″ name=”txtOT1<%=empno%>” type=”text” size=”6″ id=”txtOT1<%=empno%>” value=”<%=OT1%>” onBlur=”isnum(this.name);”></td>
Text box to be updated.
function populateOT(field,emp)
{
eval(“document.MOAREnterDets.txtOT1″ + emp +”.value”) = field;
}
but this fails with cannot assign result to a function. what am i doing wrong?
Thanks