Skip to content
Permalink
Browse files
Fix for #534
  • Loading branch information
jzaefferer committed Dec 29, 2006
1 parent b8d46f7 commit 666cc900643ac0779b5d1afd132b23d97f7f09e0
Showing with 6 additions and 1 deletion.
  1. +4 −0 src/ajax/ajax.js
  2. +2 −1 src/ajax/ajaxTest.js
@@ -714,6 +714,10 @@ jQuery.extend({
jQuery.handleError(s, xml, null, e);
}

// firefox 1.5 doesn't fire statechange for sync requests
if(!s.async)
onreadystatechange();

// return XMLHttpRequest to allow aborting the request etc.
return xml2;
},
@@ -44,8 +44,9 @@ test("synchronous request", function() {
});

test("synchronous request with callbacks", function() {
expect(2);
var result;
$.ajax({url: "data/json.php", async: false, success: function(data) { result = data; } });
$.ajax({url: "data/json.php", async: false, success: function(data) { ok(true, "sucess callback executed"); result = data; } });
ok( /^{ "data"/.test( result ), "check returned text" );
});

0 comments on commit 666cc90

Please sign in to comment.