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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:18:16+00:00 2026-06-05T23:18:16+00:00

I am utilising the callback function of jQuery’s .load method to run certain code

  • 0

I am utilising the callback function of jQuery’s .load method to run certain code if the textStatus parameter of the .load method is equal to a certain string.

e.g. I have

jQuery("#myContainer").load('/seperate-file-with-content.asp', function(responseText, textStatus, xhr){                     
    if (textStatus === "error" || responseText.length <= 0) {
        //file failed to load i.e. textStatus == error 
        //or file loaded but has no content
    } else {
        //file loaded successfully i.e. textStatus == success
    }       
});

But i’m worried that the else part of the if statement may catch other non expected textStatus values that aren’t equal to success.

Are there any other possible values to textStatus, other than error and success ?

EDIT/UPDATE: As I now believe that .load is based on .ajax, the answers in the following question may be of use for anyone else with a similar question:- In jQuery's ajax success callback, will textStatus ever not be "success"?

  • 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-05T23:18:17+00:00Added an answer on June 5, 2026 at 11:18 pm

    load() is based on $.ajax(), and the documentation for this method lists the possible statuses as:

    • abort
    • error
    • notmodified
    • parsererror
    • success
    • timeout
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a (currently very simple) website that is utilising Facebook's Website with Facebook
utilising xcode using the random function i want to switch to from a view
I am currently building a php form utilising the jQuery iPhone style radios (found
I have a small vb.net application utilising the FileSystemWatcher hooked up to a UNC
im pulling my hair out. im utilising mod_rewrite to run through index.php if %{REQUEST_URI}
Just getting confused when trying to display certain things when utilising itemssource, datacontexts and
I'm having some trouble unit testing a bit of code while utilising the Wcf
We've got some pretty complex code that's utilising the drag and drop functionality provided
I have been using Selenium (WebDriver) for some time now, utilising Microsoft Team Foundation
I'm trying to design the architecture for a new LOB MVVM project utilising Caliburn

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.