|
Re: Problem accessing specific form elements
You don't *have* to use getElementdById, it will work the same either way. The problem is that you were looping through numbers 1 to 3 but you were looking for the same element every time.
All you have to do is change this...
itemValue = document.step1.elements['foo1'].value;
...into this:
itemValue = document.step1.elements['foo'+i].value;
|