logicjb
asked on
Check for file upload on submit
Hi
I currently have a HTML form with a file uplaod field within it, I would like to have a javascript check so that everyone HAS to upload a file to submit the form.
At the moment I have a javascript variable being set to True when the file field changes, and a check for true when it is submitted. But people are still not uploading files. Is there a better way to ensure a file is selected?
I currently have a HTML form with a file uplaod field within it, I would like to have a javascript check so that everyone HAS to upload a file to submit the form.
At the moment I have a javascript variable being set to True when the file field changes, and a check for true when it is submitted. But people are still not uploading files. Is there a better way to ensure a file is selected?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
Community Support Moderator
Computer101
Community Support Moderator
ASKER
Only one file has to be uploaded