-
Getting values
Hi,
I have a form with 5 text boxes, T1 - T5, I want to take the values of the textbox in a loop, say
for(i=1;1<=5;i++)
{
checking the values.
}
Now how to get the values in this loop? say if I have a variable
var T= "T" + i; inside the loop, how to make this string as a textbox and get the value?
Thanks,
Pres
-
you could have 5 text boxes the same name
which then become an array.
Code:
for i=0;i<5;i++)
document.formname.txtname[i].value;
-
I tried this 1
Hi,
Thanks for your reply, I tried with this 1 and it worked.
Code:
for (i=0;i<5;i++)
{
T="T" + i;
document.formname.item(T).value;
}
This gave me the value.
Thanks,
Pres.