Hi
I have a loop in javascript as follows:
for(i = 0; i < num_rows; i++)
{
document.update.list_i[1] = num.value;
}
What I am trying to do is use the i variable in a loop to build the name of the form element each time for example:
document.update.list_0[1] = num.value;
document.update.list_1[1] = num.value;
document.update.list_2[1] = num.value;
etc. etc.
Could someone help me with the code above i.e. how to change the line of code to know that i is to be 0, 1, 2, 3, 4 etc
Thanks for the help
Fergal.
I have a loop in javascript as follows:
for(i = 0; i < num_rows; i++)
{
document.update.list_i[1] = num.value;
}
What I am trying to do is use the i variable in a loop to build the name of the form element each time for example:
document.update.list_0[1] = num.value;
document.update.list_1[1] = num.value;
document.update.list_2[1] = num.value;
etc. etc.
Could someone help me with the code above i.e. how to change the line of code to know that i is to be 0, 1, 2, 3, 4 etc
Thanks for the help
Fergal.