Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8504103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:56:03+00:00 2026-06-11T01:56:03+00:00

I have a question about how the XMLHttpRequest object works. In https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest , under

  • 0

I have a question about how the XMLHttpRequest object works. In https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest, under properties I am looking at the “response” property. The description says I should get a JavaScript object back if my content type is json. However, in my code the xhr.response property is undefined.

Specifically, I have a .ajaxSuccess() callback that is setup on a DOM element, it receives the parameters (event, xhr, settings). xhr.responseText is the plaintext version of my json, but xhr.response is undefined. Is there any way I can get the object from xhr without calling $.parseJson(xhr.responseText)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:56:05+00:00Added an answer on June 11, 2026 at 1:56 am

    I think you are confusing the XMLHttpRequest object with jQuery’s jqXHR object used by $.ajaxSuccess(), which is supposed to be a superset of the former.

    Instead, you could use $.ajax()‘s done handler, which will parse the JSON for you if the data type is json. For example:

    $.ajax({
      url: url,
      dataType: 'json',
    }).done(function (response) {
      // response is a JSON object, previously parsed by jQuery using $.parseJSON
    });
    

    Also note that even though the documentation of $.ajaxSuccess() says that you get a vanilla XMLHttpRequest object, that is no longer true as of jQuery 1.4.1. Instead, you get a jqXHR object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about how GC works in Java. Consider the following code:
I have question about the beta Open Graph stuffs. The documentation I am looking
i have question about two different Bundle object in below methods : onSaveInstanceState(Bundle outState);
Hey So I have a question about posting using an XMLHttpRequest. In theory, if
I have a question on the xmlhttprequest object. Let's say I create a xmlhttprequest
https://stackoverflow.com/a/64983/468251 - Hello, I have question about this code, how made that working with
I have question about parsing in Html helper : I have sth like: @foreach
I have question about clean thory in Python. When: @decorator_func def func(bla, alba): pass
I have question about XSLT1.0. The task is to write out in HTML all
I have question about normalization. Suppose I have an applications dealing with songs. First

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.