Weirdness in IE with dynamic input type=file
Date: 07/10/05
(Web Development) Keywords: java
So, summary of my problem: inspired by gmail's method of attaching files, I'm writing a proof-of-concept file uploader which will allow an arbitrary number of files to be uploaded from the page (size limiting on the server side).
I would like to take advantage of IE's non-standard click method of the FileUpload DOM object in Javascript. Though the interface works like a charm, when I click the submit button, it does not submit, but instead with each click, advances the cursor to the next file input and blanks it out. Only after it has visited each of the inputs will the submit button work as expected, and then of course, it's of no use.
To see what I mean, try copying and pasting this code into a page, and view in IE (note that you should be able to test this behavior without having the back end script - in fact, this can be looked at in a local file, without any server):
Upload Files
Anybody have any clue why this is happening and/or what to do about it?
Source: http://www.livejournal.com/community/webdev/219014.html