lmf232s
09-23-2004, 05:25 PM
I have an array of txtboxes named txtWFG1 - txtWFG17
I have another array of txtboxes named txtOSO1 - txtOSO17
What i need to be able to do is when i click a button,
have the value of
txtWFG1 = txtOSO1
For all 17 text boxes.
I tried something like this.
var oForm = "document.form";
for (i = 0; i < 17; i++){
oForm.elements[txtWGF+i].value = oForm.elements[txtOSO + i].value;
alert(" i made it ") ;
)
I am having problem building the name of the text box for each.
I could just have 34 variables and set one = to another but i rather not.
I rather use a loop and do it on the fly.
How do i accomplish this guys.
Thanks.
I have another array of txtboxes named txtOSO1 - txtOSO17
What i need to be able to do is when i click a button,
have the value of
txtWFG1 = txtOSO1
For all 17 text boxes.
I tried something like this.
var oForm = "document.form";
for (i = 0; i < 17; i++){
oForm.elements[txtWGF+i].value = oForm.elements[txtOSO + i].value;
alert(" i made it ") ;
)
I am having problem building the name of the text box for each.
I could just have 34 variables and set one = to another but i rather not.
I rather use a loop and do it on the fly.
How do i accomplish this guys.
Thanks.