equal
deleted
inserted
replaced
320 deferred.error(xhr, status, null); |
320 deferred.error(xhr, status, null); |
321 } |
321 } |
322 }); |
322 }); |
323 return deferred; |
323 return deferred; |
324 } else { |
324 } else { |
325 var result = jQuery.ajax({ |
325 var result; |
|
326 // jQuery.ajax returns the XHR object, even for synchronous requests, |
|
327 // but in that case, the success callback will be called before |
|
328 // jQuery.ajax returns. The first argument of the callback will be |
|
329 // the server result, interpreted by jQuery according to the reponse's |
|
330 // content-type (i.e. json or xml) |
|
331 jQuery.ajax({ |
326 url: url, |
332 url: url, |
327 type: (reqtype || 'GET').toUpperCase(), |
333 type: (reqtype || 'GET').toUpperCase(), |
328 data: form, |
334 data: form, |
329 traditional: true, |
335 traditional: true, |
330 async: false |
336 async: false, |
|
337 success: function(res) { |
|
338 result = res; |
|
339 } |
331 }); |
340 }); |
332 return result; |
341 return result; |
333 } |
342 } |
334 } |
343 } |
335 |
344 |