Hi, I have the following code to validate the fields of a form. I have 20 of such field (filesize1, filesize2,...,filesize20). Can anyone help to advise me on what to add to this code so that it can loop through all the 20 variables? Bascially, I need to change the filesize variable so that it can change to filesize1, ... , filesize20 in the loop.
Code:
if (txtselfilesize.value!="")
{
if (isNumericOrDecimal(txtselfilesize)==false)
{
mesg = "You have entered <" + txtselfilesize.value + "> for Filesize\n"
mesg = mesg + "Please enter a numerical value."
alert(mesg)
txtselfilesize.focus();
return false;
}
}