I am having difficulties referencing struts html tags through Javacript.
I am trying to validate 10 file upload boxes to see if the user has at least
uploaded 1 file and also to validate the extension of the file (.jpg).
<tr><html:file name="uploadFilesActionForm" property="uploadedFiles[0]"
accept="image/jpg, image/jpeg"></html:file></tr>
<tr><html:file name="uploadFilesActionForm" property="uploadedFiles[1]"
accept="image/jpg, image/jpeg" ></html:file></tr>
<tr><html:file name="uploadFilesActionForm" property="uploadedFiles[2]"
accept="image/jpg, image/jpeg" ></html:file></tr>
<tr><html:file name="uploadFilesActionForm" property="uploadedFiles[3]"
accept="image/jpg, image/jpeg" ></html:file></tr>
..........and so on
I am trying to set up a Javascript function like the following:
document.form.getElementById("uploadedFiles");
But it does not work.
Any ideas?