@rambo-panda just to make sure you are aware that the :file selector has been deprecated. Newer versions of jQuery will only support the standard selector e.g. input[type="file"]
Issue: Progress Bar was getting filled to 100% without selecting any file.
/* i have added this patch to resolve the issue */
if($('#myfile').val() == ''){
$('#message').css('color','red');
$('#message').html('Please select a file first & then click on Upload');
return false;
}
It's working for me..
This comment has been minimized.
file input type seems to be not recognized in this way:
I.E:
"input type="file" name="file_binario" id="file_binario"
$('input:file:enabled[value]') returns
["input type="file" name="file_binario" id="file_binario"]
instead
$('input[type=file]:enabled[value]') returns
[]
Any suggestion? Tnx
This comment has been minimized.
this works
This comment has been minimized.
Changed to $('input[type=file]:enabled[value!=""]', this);
This comment has been minimized.
$('input[type="file"]:enabled[value!==""]',this); //Will be better
// or
$('input:file:enabled[value!==""]',this); // l like
This comment has been minimized.
@rambo-panda just to make sure you are aware that the
:file
selector has been deprecated. Newer versions of jQuery will only support the standard selector e.g.input[type="file"]
This comment has been minimized.
It looks like $('#new-form input[type=file]:enabled[value!=""]').length returns 0 on IE even if file is selected.
This comment has been minimized.
[value!=""] does not work on IE. How about this ?
This comment has been minimized.
The problem occurs only in IE if you do not specify enctype. (enctype="multipart/form-data")
This comment has been minimized.
@Gemorroj @drypot In Chrome [value!=""] does not work when enctype="multipart/form-data" is not specified
This comment has been minimized.
Current impl:
var fileInputs = $('input[type=file]:enabled:not([value=""])', this);
This comment has been minimized.
Issue: Progress Bar was getting filled to 100% without selecting any file.
/* i have added this patch to resolve the issue */
if($('#myfile').val() == ''){
$('#message').css('color','red');
$('#message').html('Please select a file first & then click on Upload');
return false;
}
It's working for me..
Does anybody have any idea