question about Struts html tags and Javascript getElementById

2005-08-22 Thread Gordon Hu
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). trhtml:file name=uploadFilesActionForm property=uploadedFiles[0]

Re: question about Struts html tags and Javascript getElementById

2005-08-22 Thread Dave Newton
Gordon Hu wrote: trhtml:file name=uploadFilesActionForm property=uploadedFiles[0] accept=image/jpg, image/jpeg/html:file/tr I am trying to set up a Javascript function like the following: document.form.getElementById(uploadedFiles); Any ideas? What does the generated file upload HTML look

Re: question about Struts html tags and Javascript getElementById

2005-08-22 Thread Gordon Hu
trinput type=file name=uploadedFiles[0] accept=image/jpg, image/jpeg value=/tr trinput type=file name=uploadedFiles[1] accept=image/jpg, image/jpeg value=/tr trinput type=file name=uploadedFiles[2] accept=image/jpg, image/jpeg value=/tr trinput type=file name=uploadedFiles[3] accept=image/jpg,

Re: question about Struts html tags and Javascript getElementById

2005-08-22 Thread Dave Newton
Gordon Hu wrote: trinput type=file name=uploadedFiles[0] accept=image/jpg, image/jpeg value=/tr I was asking as a subtle hint that there is nothing with an id of uploadedFiles making your JavaScript not do what you want it to. On 8/22/05, Dave Newton [EMAIL PROTECTED] wrote: Gordon

Re: question about Struts html tags and Javascript getElementById

2005-08-22 Thread Ross Gibb
According to the docs, http://struts.apache.org/userGuide/struts-html.html#file, the html:file tag will render and id tag with the attribute styleId. Also, when I use getElementById I just call it on the document. So what I think you are trying to do is so: trhtml:file

Re: question about Struts html tags and Javascript getElementById

2005-08-22 Thread Sudhaker Raj
This works in IE, Hope this helps. Thanks. form name=myForm onsubmit=return checkMe(this); trinput type=file name=uploadedFiles[0] accept=image/jpg, image/jpeg value=/tr trinput type=file name=uploadedFiles[1] accept=image/jpg, image/jpeg value=/tr trinput type=file name=uploadedFiles[2]