Firefox can't parse JSON string in jQuery AJAX response -


While trying to parse JSON string in jQuery AJAX response, I am facing a strange problem. Here's my code:

  $ Ajax ({type: "POST", url: "save", data: {end end, settings: settings}}). Msg) {warning (msg); Var obj = jQuery.parseJSON (msg); If (obj.status == "done") {window.location = obj.redirect;}}); On IE, Chrome and Safari, I'm getting a warning in the Jasonson string, but on Firefox, I  

[obj XMLDocument]

Code>

In the Warning.

Here is the FF console:

Enter image details here

Ohz is empty , but I can see the response JSON string in the console under the text attribute

  response = object {xml = document, Any reason for this behavior?  < / Div> 

The problem was on the sublett side. I set contentType to make it work Neither had.

  response Kset content type ( "text / JSON");    

Comments