X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=d22f1528b8a7c14f485e66a74741850d5d6ef0c0;hb=cbda6c541b9f2dd8fbaa084ecce7f421e8dc3dc4;hp=91043dedd1458b931f1702538b0fb8fa266684c3;hpb=a894c604895efb29e9b0937301cc404ad72e1738;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 91043de..d22f152 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -71,7 +71,7 @@ jQuery.fn.extend({ .filter(function(){ return this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || - /text|hidden|password/i.test(this.type)); + /text|hidden|password|search/i.test(this.type)); }) .map(function(i, elem){ var val = jQuery(this).val(); @@ -95,7 +95,7 @@ jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".sp var jsc = now(); jQuery.extend({ - + get: function( url, data, callback, type ) { // shift arguments if data argument was ommited if ( jQuery.isFunction( data ) ) { @@ -275,7 +275,9 @@ jQuery.extend({ }; } - head.appendChild(script); + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); // We handle everything using the script element injection return undefined; @@ -484,7 +486,7 @@ jQuery.extend({ if ( xml && data.documentElement.tagName == "parsererror" ) throw "parsererror"; - + // Allow a pre-filtering function to sanitize the response // s != null is checked to keep backwards compatibility if( s && s.dataFilter ) @@ -501,7 +503,7 @@ jQuery.extend({ if ( type == "json" ) data = window["eval"]("(" + data + ")"); } - + return data; },