X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=c6b8d0fa054c0bd1173efcfab07aeeaa996f15ac;hb=b7a3b220a8a2b5b0378c9f176ca5ae0f786a6fcf;hp=9a843022ce7d0fb1476ec48fa37c54c32d0aa695;hpb=eaca153aea6e7b00fd458cac0c8abadcbab8ad61;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 9a84302..c6b8d0f 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -296,7 +296,9 @@ jQuery.extend({ // Handle memory leak in IE script.onload = script.onreadystatechange = null; - head.removeChild( script ); + if ( head && script.parentNode ) { + head.removeChild( script ); + } } }; } @@ -449,7 +451,7 @@ jQuery.extend({ // Send the data try { - xhr.send( type === "POST" ? s.data : null ); + xhr.send( type === "POST" || type === "PUT" ? s.data : null ); } catch(e) { jQuery.handleError(s, xhr, null, e); }