I'm trying to write from dynamically created hidden fields to a txt
field in the onchange event handler within a select.
basically the number for the for loop is generated by a field from a
db
which creates hidden fields populated by prices
once the onchange handler fires it sets the text for the text field
price and the hidden field Tsize, but I can't get it to set the txt of
oldprice from the hidden field prevprice.
here's the code
<SCRIPT LANGUAGE=JavaSc ript>
<!--
function ch_price (theForm) {
for (i=0; i < <%=(rsSaleC.Fie lds.Item('prodC ').Value)%>; i++){
document.form1. price.value =
document.form1. size.options[document.form1. size.selectedIn dex].value;
document.form1. Tsize.value =
document.form1. size.options[document.form1. size.selectedIn dex].text;
document.form1. oldprice.value = document.form1. prevprice[i].value;
}
}
//-->
</SCRIPT>
and in the body
<select name="size" id="size" onChange="ch_pr ice(form1)">
<option selected
value="<%=(rsDi splay.Fields.It em("Price").Val ue)%> ">Select
Size/Colour</option>
<%
while (!rsSale.EOF) {
%>
<option
value="<%=(rsSa le.Fields.Item( "price").Value) %>"
<%=(rsSize.Fie lds.Item("Size" ).Value)%></option>
<%
rsSale.MoveNext ();
}
if (rsSale.CursorT ype > 0) {
if (!rsSale.BOF) rsSale.MoveFirs t();
} else {
rsSale.Requery( );
}
%>
does any one have any ideas?