// Wait for a response to come back
var onreadystatechange = function(isTimeout){
// The request was aborted, clear the interval and decrement jQuery.active
- if ( xhr.readyState === 0 ) {
+ if ( !xhr || xhr.readyState === 0 ) {
if ( ival ) {
// clear poll interval
clearInterval( ival );
// 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);
}