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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:25:26+00:00 2026-05-29T04:25:26+00:00

In traditional javascript AJAX, we know if readystate is: 0 – The request is

  • 0

In traditional javascript AJAX, we know if readystate is:

  • 0 – The request is not initialized
  • 1- The request has been set up
  • 2 – The request has been sent
  • 3 – The request is in process
  • 4 – The request is complete.

When it comes to jQuery AJAX, we have:

  • complete property where we code what should happen after completion
  • success property where we code what should happen if the ajax request succeeds and
  • error property where we code what should happen if ajax request fails.

All of the above properties lets us code to do something after completion of ajax request. Where can I specify some code to execute something during processing(when readyState is 3) in Jquery Ajax??

As my AJAX script takes too long time to execute, which means, I will not attain ‘complete’ stage quickly. This seems like nothing is happening to the user. I wanted to initiate another ajax script at processing stage which gets information from server meanwhile and shows the user what has been done so far. Is it possible at all in Javascript? I know there is no multi-threading in Javascript.

I think I made my self clear. But, Please let me know if anything is not making any sense.

  • 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-29T04:25:27+00:00Added an answer on May 29, 2026 at 4:25 am

    I handle this by initiating the first long running request, returning to the user immediately and allowing the process to fork server side for the extended processing.

    The initial return ajax call to the user sets them up to ‘watch’ that process via a flag against the object ( I store them against the object in the database, but you could for instance watch file sizes or other stuff )

    Subsequent ajax calls occur in a loop, each one returning setTimeout for the next call, and report on changes to that flag so the progress of the long running process is then visible. Completion of the long running process prompts NOT sending another setTimeout() and showing the overall results.

    If your process is not that intensive, a simple spinner would probably do the job and no work for your server process. I usually handle that having $.ajax flip the visibility of a ‘spinner’ icon that’s preloaded on my pages in the same spot for all.

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

Sidebar

Related Questions

My javascript client makes a JSONP request via the JQuery $.ajax() method every second.
The company has the traditional complex organizational structure, defining the amount of levels using
I've been using the JQuery Autocomplete plugin with JQuery version 1.3.2, and it has
I have the following: $.ajax({ type: POST, traditional: true, url: /Administration/Locations/DoAction, data: { partitionKey:
I have a very simple javascript class that does an ajax call to a
I made a website that depends on PHP, AJAX and Javascript. The problem here
Yesterday I moved CultureRater.com across to XHTML 1.0 Transitional and while the javascript below
Traditional logfile analytics tools (awstats, statcounter) or general web analytics (google analytics, yahoo web
In traditional embedded programming, we will give a delay function like so: for(i=0;i<255;i++) for(j=0;j<255;j++);
In traditional ASP.NET (Web Forms), the UpdatePanel control lets you do a partial refresh

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.