File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*!
2
2
* jQuery Form Plugin
3
- * version: 3.08 (07 -APR-2012)
3
+ * version: 3.09 (16 -APR-2012)
4
4
* @requires jQuery v1.3.2 or later
5
5
*
6
6
* Examples and documentation at: http://malsup.com/jquery/form/
21
21
to bind your own submit handler to the form. For example,
22
22
23
23
$(document).ready(function() {
24
- $('#myForm').bind ('submit', function(e) {
24
+ $('#myForm').on ('submit', function(e) {
25
25
e.preventDefault(); // <-- important
26
26
$(this).ajaxSubmit({
27
27
target: '#output'
@@ -808,8 +808,14 @@ $.fn.formToArray = function(semantic, elements) {
808
808
if ( elements )
809
809
elements . push ( el ) ;
810
810
var files = el . files ;
811
- for ( j = 0 ; j < files . length ; j ++ ) {
812
- a . push ( { name : n , value : files [ j ] , type : el . type } ) ;
811
+ if ( files . length ) {
812
+ for ( j = 0 ; j < files . length ; j ++ ) {
813
+ a . push ( { name : n , value : files [ j ] , type : el . type } ) ;
814
+ }
815
+ }
816
+ else {
817
+ // #180
818
+ a . push ( { name : n , value : '' , type : el . type } ) ;
813
819
}
814
820
}
815
821
else if ( v !== null && typeof v != 'undefined' ) {
You can’t perform that action at this time.
0 commit comments