$.ajax({
type: "POST",
url: "bla",
xhrFields: { responseType: "document" },
data: {},
success: function(arg,arg2,request){
console.log(request.responseXML)
}
})
Why is it printing ‘undefined’? How would I fix this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you expecting a JSON return? What happens when you try:
If you look at jQuery’s documentation, they outline how:
The response variable therefore contains what you need. To see its structure, do a
console.log()and go to the ‘Console’ tab in your Developer Tools (Chrome) or Firebug (Firefox).