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

  • Home
  • SEARCH
  • 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 3942862
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:42:49+00:00 2026-05-20T00:42:49+00:00

My error handling isn’t working on this ajax request… Just now my r was

  • 0

My error handling isn’t working on this ajax request… Just now my “r” was

<br />
<b>Warning</b>:
simplexml_load_string() [
    <a href='function.simplexml-load-string'>
        function.simplexml-load-string

and it didn’t execute what’s in the } else { or even the console.log

success: function (r) {

    console.log(r); 
    $('.processing').addClass('hide');              
    if (r.type == 'success') {
        if (r.message.match(/approved/).length > 0) {
            triggerNotification('check', 'Payment has been accepted');
        } else {
            triggerNotification('check', r.message);
        }

        document.location = '/store/order/view?hash='+r.hash;
    } else {
        $('.button').show();

        var msg = 'Unable to run credit card: '+r.message;

        if (parseInt(r.code) > 0) {
            msg = msg+' (Error code: #'+r.code+')';
        }

        triggerNotification('x', msg);
    }
},
  • 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-05-20T00:42:50+00:00Added an answer on May 20, 2026 at 12:42 am

    That’s a PHP error, not an AJAX error. The PHP error didn’t set an HTTP error header, so your AJAX callback read it as a valid response.

    It also seems that you are using dataType: json, so since the response from PHP was HTML and not JSON, r would be undefined and that’s why console.log(r) failed (which probably threw an error in your console, and killed the script).

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

Sidebar

Related Questions

I am writing a custom error handling / reporting function for PHP file upload
As per this article , I've extended the System.Windows.Forms.WebBrowser class to implement custom error-handling.
I am using the following error handling function, which emails the error to $admin_email
This really isn't an important question. I just wanted to know which method is
I've tried this from a couple of different approaches, but this isn't working as
Thanks to reading about error handling on StackOverflow , I discovered Mz-Tools. However, I
What are some good patterns for error handling in VBA? In particular, what should
I actually have two questions regarding exception/error handling in the iPhone app that I
I want to make a general error handling package that should be called from
I've been trying to write an error handling class that I can use on

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.