I have been through the FAQ and have been unable to come up with a solution for this problem. I need to access the value of the variable jdage.
To validate the value of jdage I have created the following for loop:
The error message I keep getting is that document.clothing.undefined.value is null or not an object.
Any help will be greatly appreciated!!!
Code:
document.write("<FORM NAME="clothing">");
var jdage = "jdage" + m;
document.write("<TABLE>");
document.write("<TR>");
document.write("<TD><INPUT NAME=" + jdage + " TYPE=\"RADIO\" VALUE=\"toddler\" CHECKED>Toddler</TD>");
document.write("<TD><INPUT NAME=" + jdage + " TYPE=\"RADIO\" VALUE=\"youth\">Youth</TD>");
document.write("<TD><INPUT NAME=" + jdage + " TYPE=\"RADIO\" VALUE=\"adult\">Adult</TD>");
document.write("</TR>");
document.write("</table>");
document.write("<BR>");
m++;
To validate the value of jdage I have created the following for loop:
Code:
for (a=0; a < 2; a++);
{
var amt = eval("document.clothing." + jdage[a] +".value");
eval("alert('The value of jdage is: ' + amt)");
}
The error message I keep getting is that document.clothing.undefined.value is null or not an object.
Any help will be greatly appreciated!!!