IE7 File Uploads don’t work - nothing happens
So, Microsoft have a released a new Internet Explorer and as per usual, we’re going to have to re-code all our sites for it. So, what’s this versions problem: file uploads.
I have a site that uploads a file in the usual HTML form way and then the PHP on the server checks if it’s a JPEG and uses copy() to move it to a desired folder. I tested it in FireFox and everything was working fine and since it’s so simple a script I left it at that. Then a client with IE7 called me because he was trying to upload a jpeg and nothing was happening. I fired up IE and gave it a go and when I clicked on the Submit button it just sat there, doing sod all.
A bit of digging and I found that the problem was because I’d included the following in the code for the Submit Button:
onClick=”this.disabled = true;”
This was being executed by IE and then it appears it just sits there and forgots you clicked Submit. You can give IE a good kicking and get it working again by changing it to:
onClick=”this.disabled = true; document.form.submit();”
I hate IE and M$

