Multiple File Upload plugin for jQuery and IE7 and jQuery validation form - May 14th, 2008
All of you, maybe, know about this super Multiple File Upload. But when I start use it I have a strange things in IE7. I know it you could see it on the plugin website. (Select one file and the set focus again to this field or just try to upload another file).

So have I fix this bug.
1. open jquery.MultiFile.js some with editors
2. after
/// now let’s use jQuery
slave = $(slave);
insert this
slave.attr("name",(slave.name || $(MASTER).attr(’name’) || ‘file’));
slave.attr("id",(slave.id || MASTER.generateID(slave.i)));
slave.val(”);
slave.focus();
3. change
// Remove element, remove label, point to current
if(slave.i==0){
$(MASTER.eCur).remove();
MASTER.eCur = slave;
}
else{
$(slave).remove();
};
to
$(slave).remove();
4. Thats all!
Now problem with jQuery validation plugin.
If you have a error message about that you should enter data less or equal some number. You should replace all ".max" to ".maximum". Thats all too.
It was very helpful for me, so I hope it will be helpful for you!. If you have any question just ask me.
Tags: AJAX, IE, Multiple File Upload plugin
May 20th, 2008 at 9:21 pm
You should send this fix to Diego so that he can incorporate these changes into the core plugin. He’s had it messed up in IE 7 since version 1.26. For some reason, setting an input field in IE 7 to val=” doesn’t work to clear a type=”file” input (at least according to my experimentation).
Thank you very much for pointing out how to work around this issue.
May 20th, 2008 at 10:30 pm
1. The problem was not in the logic of the plugin
2. You work-around isn’t very reliable / neat
I was able to reproduce this behaviour in IE7 and found that - for some reason - the browser was firing the onchange event twice: onchange and onblur.
I fixed the problem by changing this code:
// Triggered when a file is selected
$(slave).change(function(){
…into this:
// Triggered when a file is selected
$(slave).change(function(){
// Lose focus to stop IE7 firing onchange again
$(this).blur();
Please download the latest version of the plugin to avoid future version conflicts:
http://www.fyneworks.com/jquery/multiple-file-upload/
PS.: Would you care to explain why you think this plugin is so awful?
May 21st, 2008 at 1:41 pm
Diego,
Thanks for so quick response. I know that my solution of problem is not so good, but I was really need to fix this issue. Anyway thank to you for this very useful and very nice plugin! Lets make web-world better ;)
November 20th, 2008 at 7:09 am
Hi,
Sorry for my stupid question. I am getting stuck in the reset feature of Multi file upload plug in. I use ajaxSubmit to submit my form and want the multifile upload to reset for new form insertion. Can you please help?
Thanks in advance
Kien