jquery ajax problem in chrome

Posted by spaceman on Stack Overflow See other posts from Stack Overflow or by spaceman
Published on 2009-11-16T12:58:46Z Indexed on 2010/05/31 14:53 UTC
Read the original article Hit count: 161

Filed under:
|
|

i have the following jquery code running on my page just fine in FF and IE, but chrome seems to be freaking out..

in FF and IE the call is made and the result is appended to the div. in chrome, it calls ajaxfailed on failure.

the XMLHttpRequest passed to the AjaxFailed function has a status code of "200" and the statusText is "ok". the readystate is 4 and the responseText is set to the data i wish to append to the div.. basically from what i can see its calling the failure method but it isn't failing.. i have tried with both get and post requests and it always breaks in chrome.

function getBranchDetails(contactID, branchID) {
  $.ajax({
    type: "GET",
    url: urlToRequestTo,
    data: "{}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: branchDetailsSuccess,
    error: AjaxFailed
  });
}



 function branchDetailsSuccess(result) {
      $("#divBranchControl").empty();
      $("#divBranchControl").append(" " + result);
      $("#branchDiv").tabs();
    }



 function AjaxFailed(result) {
      alert("FAILED : " + result.status + ' ' + result.statusText);
    }

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX