Fixed ajax array arguments in $.param
[jquery.git] / src / ajax / ajax.js
index 7d83a0e..c8e10bd 100644 (file)
@@ -77,7 +77,7 @@ jQuery.fn.extend({
                        complete: function(res, status){
                                // If successful, inject the HTML into all the matched elements
                                if ( status == "success" || !ifModified && status == "notmodified" )
-                                       self.html(res.responseText)
+                                       self.html(res.responseText);
 
                                self.each( callback, [res.responseText, status, res] );
                        }
@@ -794,7 +794,7 @@ jQuery.extend({
                                // If the value is an array then the key names need to be repeated
                                if ( a[j] && a[j].constructor == Array )
                                        jQuery.each( a[j], function(){
-                                               s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
+                                               s.push( encodeURIComponent(j) + "[]=" + encodeURIComponent( this ) );
                                        });
                                else
                                        s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );