LyndonOHRC
Programmer
I have a form with a dynamic number of text fields, each field has checkboxes under them. I want to change the value of the text field when the box is checked.
I'm missing something. the_field.value='100' is not giving an error, but is not referencing the field either.
Need help
Thanks
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
I'm missing something. the_field.value='100' is not giving an error, but is not referencing the field either.
Need help
Thanks
Code:
<form name="Receipt" action="PrintReceipt" method="post">
<input name="Amount#i#" type="Text" size="5">
<input name="CBoxA" value="1" type="Checkbox" onclick="CBoxA('#i#')">
<script language="JavaScript" type="text/javascript">
function AmountA(i){
var the_field='document.Receipt.Amount'+i;
the_field.value='100';
}
</script>
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey