|
-
Sep 23rd, 2002, 12:22 AM
#1
Thread Starter
Addicted Member
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
-
Sep 23rd, 2002, 03:21 AM
#2
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;
-
Sep 23rd, 2002, 05:08 AM
#3
Thread Starter
Addicted Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|