Helene Prince wrote:If my understanding is correct, the form is created through the struts-config.xml file.
Your understanding is not correct. The HTML form tag is likely generated by a
struts tag in your page.
I attempted to add an id tag there, but it didn't solve my problem
Of course not. That has nothing to do with the issue.
I guess I will stick with using the getElementsByName method since it's working, but at least I now have a much better understanding of the issue.
Based on the above, I'd say you need to investigate this issue more because you do not have a good grasp of what's going on.
I suggest finding out where the form tag is being declared and actually fixing the problem rather than slapping a band-aid on it.