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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:54:30+00:00 2026-06-04T08:54:30+00:00

I am calling a script using ajax. I want to show the progress of

  • 0

I am calling a script using ajax. I want to show the progress of script execution on the page.

I mean I want to display the following messages in a div progressively:

//after execution of section 1
Section 1 of script executed successfully.
//after execution of section 2
Section 2 of script executed successfully. 
//after execution of last section
Script execution complete.

The method I am using is displaying all the 3 messages only after the complete execution of the script.

var script1_ajax = new XMLHttpRequest();

    script1_ajax.onreadystatechange=function() {            
        if (script1_ajax.readyState==4 && script1_ajax.status==200) {

            document.getElementById('result').innerHTML = script1_ajax.responseText;

        }
    }

I don’t want to break my script into multiple scripts.

Please suggest how to do this.

  • 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-04T08:54:31+00:00Added an answer on June 4, 2026 at 8:54 am

    There are various techniques for keeping a connection to the server open and getting interim updates from that connection, which take the collective term “comet,” which is described here. Long-polling, hidden iframes with chunked blocks, XHR on some browsers, etc. One or more of those may be useful to you. Note that different techniques work with different browsers, and each has upsides and downsides.

    The situation will be rather better in a few years, when we can rely on web sockets, but for now that’s not an option unless you can restrict use of your site/application to the few browsers that currently support them.

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

Sidebar

Related Questions

I'm building <div> elements using AJAX, and I want to add ZeroClipboard functionality. Firebug
My page sends using ajax data to a php script. one of the vars
Using jquery I am calling a php page using an ajax call. I call
I'm calling a php script (getNum.php) via ajax after creating an object and using
I am calling a service that return JSON data. Script: $.ajax({ type: "POST", url:
One part of my page is being loaded via ajax using jquery. For example
I'm calling a classic .asp page from jquery to return a list (using JSONP).
I have a script that calls a php page via jquery/ajax. The results would
I'm using a jquery map script called GMap2. I'm calling my php script via
Im using arte for jquery to call a page via ajax every 10 seconds.

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.