Reputation: 4767
I would like to to create a 2-step file uploader:
I would like to eliminate the step where the user must submit the form, and instead do it automatically with JavaScript. Is there anyway to achieve it?
Thanks.
Upvotes: 1
Views: 2424
Reputation: 449803
Setting an onChange event and checking for whether the ".value" of the upload field is "!= null" does the trick for me. However, accessing file upload fields programmatically is always a shaky issue, and things can change with future browser security updates. If you want to be sure, use a flash based upload component like SWFUpload.
Upvotes: 2