I am attempting to loop through a set of field names that are enumerated by another loop ...IE fieldName1, fieldName2, fieldName3
The code I wrote:
for (var c=1; c<document.form2.HMANY.value; c++) {
if (document.form2.txtUserName.value == "" {
missinginfo += "\n - Name";
}
where "HMANY" is the value passed from the previous form to enumerate the fields in in another loop. In this loop txtUserName is the enumerated field name. I thought adding +c to the name would resolve this, but it does not return the message.
The code I wrote:
for (var c=1; c<document.form2.HMANY.value; c++) {
if (document.form2.txtUserName.value == "" {
missinginfo += "\n - Name";
}
where "HMANY" is the value passed from the previous form to enumerate the fields in in another loop. In this loop txtUserName is the enumerated field name. I thought adding +c to the name would resolve this, but it does not return the message.