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 9180325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:01:17+00:00 2026-06-17T18:01:17+00:00

I am doing a prototype that will fetch a variety of XMLs from a

  • 0

I am doing a prototype that will fetch a variety of XMLs from a web resource location and then display them on the DOM.

Here is the function

    function readXML()
{
    $.ajax({
        type: "GET",
        url: "https://collaboratewiki.com/wikiattachments/61736956/engineer.xml",
        dataType: "xml",
        success: function(xml) 
        {
            window.alert("success")
        },
        error: function(xhr,err)
        {
            alert("readyState: "+err.readyState+"\nstatus: "+err.status);
            alert("responseText: "+err.responseText);
        }
});


}

When I call this function it goes to the error case but I get “Undefined” in my message output.

enter image description here

I need to find out why I can’t fetch my XML but with this output its not helpful at all.

How do I get all the details of the error that is happening with the AJAX call?

I have tried instead of “err.responseText” , “xhr.responseText” but I still get the undefined.

Thanks

  • 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-17T18:01:19+00:00Added an answer on June 17, 2026 at 6:01 pm

    From the documentation:

    error

    Type: Function( jqXHR jqXHR, String textStatus, String errorThrown )

    The second and third arguments are strings, not objects, so they won’t have additional properties on them. Some of the ones you’re trying to get (such as readyState) will be available from the xhr object in your code, rather than from err (which is just a string).

    You may want to try something like this:

    error: function(xhr,textStatus,err)
    {
        console.log("readyState: " + xhr.readyState);
        console.log("responseText: "+ xhr.responseText);
        console.log("status: " + xhr.status);
        console.log("text status: " + textStatus);
        console.log("error: " + err);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Context: I am load testing a prototype enterprise web app that performs quick searches
I am attempting to write a JS function (using prototype in rails) that will
I read that adding functions to an object will chew up more memory then
Is there any JavaScript function that can unify $ function from both Prototype and
I've been doing a prototype in WPF without using MVVM. It's got to such
I'm doing a software interface prototype in HTML format and on the menu I
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
I noticed that every tutorial on how to do JavaScript inheritance does this: SubClass.prototype
I've been asked to prototype a replacement file transformation process (that currently is a
I have a script that retrieves objects from a remote server through an Ajax

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.