X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax%2Fajax.js;h=b872481abf6046b90a2b86e3a3e30adf87cf39e2;hb=6c072457ed36464f7f2bc15128e69206dbac5d24;hp=2ad93315d2dfc28dbd947e0579a796470fd27c7d;hpb=34355cd6986d5939dc711c531263cb561cba5f24;p=jquery.git diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 2ad9331..b872481 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -55,7 +55,7 @@ jQuery.fn.extend({ // If the second parameter was provided if ( params ) // If it's a function - if ( jQuery.isFunction( params.constructor ) ) { + if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = null; @@ -132,7 +132,7 @@ jQuery.fn.extend({ }); // If IE is used, create a wrapper for the XMLHttpRequest object -if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" ) +if ( !window.XMLHttpRequest ) XMLHttpRequest = function(){ return new ActiveXObject("Microsoft.XMLHTTP"); }; @@ -457,7 +457,8 @@ jQuery.extend({ timeout: 0, contentType: "application/x-www-form-urlencoded", processData: true, - async: true + async: true, + data: null }, // Last-Modified header cache for next request @@ -798,7 +799,7 @@ jQuery.extend({ // Serialize the key/values for ( var j in a ) // If the value is an array then the key names need to be repeated - if ( a[j].constructor == Array ) + if ( a[j] && a[j].constructor == Array ) jQuery.each( a[j], function(){ s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) ); });