Guys,
I am very new to the whole Javascript thing and am looking for some assistance. I have a "dynamic" form in that when it comes to validation I won't have a definite idea how many rows of input boxes I will have. The input fields are named in the format of Qty1, Qty2, Qty3,...DueDate1, DueDate2, DueDate3,...,etc for each row of inputs. I have the number of rows stored as a hidden field in the form. Is there some way that I can do something like:
for (i=0; i<document.myform.numrows.value; i++) {
if (document.myform.Qty(i) =""
{ // I know this is not right but this is the kind of thing I want to do
alert ("Enter a quantity value in row i"
}
}
I am very new to the whole Javascript thing and am looking for some assistance. I have a "dynamic" form in that when it comes to validation I won't have a definite idea how many rows of input boxes I will have. The input fields are named in the format of Qty1, Qty2, Qty3,...DueDate1, DueDate2, DueDate3,...,etc for each row of inputs. I have the number of rows stored as a hidden field in the form. Is there some way that I can do something like:
for (i=0; i<document.myform.numrows.value; i++) {
if (document.myform.Qty(i) =""
alert ("Enter a quantity value in row i"
}
}