jQuery .ajax() call to page method works in FF only when async is false
- by Steve
I'm calling a page method using .ajax() and it works in IE8 whatever the value of async is. However, in FF3.6, it only works with async set to false. When async is set to true, in Firebug, I just see status aborted. The page validates. I can work with async set to false, but any clues as to why FF can't work with async set to true?
$("[id$='_www']").click(function() {
var hhh = false;
$.ajax({
async: false,
cache: false,
type: "POST",
url: "/abc/def.aspx/jkl",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: "{ 'eee': '"
+ window.location.href.match(/\d{1,3}$/)
+ "', 'ttt': '"
+ $("[id$='_zzz']").val()
+ "' }",
success: function(msg) {
$("#ggg").html(msg.d);
},
error: function(xhr, err) {
hhh = true;
}
});
return hhh;
});