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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:09:34+00:00 2026-05-20T14:09:34+00:00

In Prototype, are there AJAX start/stop events that would allow you to create one

  • 0

In Prototype, are there AJAX start/stop events that would allow you to create one script for globally displaying a modal wait message during AJAX loads?

Like, with jQuery I’m using this one script in the application layout to globally display a modal wait dialog for any jQuery AJAX events:

<script type="text/javascript">
$(document).ajaxStart(function () {
    $.blockUI({ message: '<h1><img src="../images/busy.gif" /> Just a moment...</h1>' });
});
$(document).ajaxStop(function () {
    $.unblockUI();
});
</script>

Thanks – much appreciated?

  • 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-20T14:09:34+00:00Added an answer on May 20, 2026 at 2:09 pm

    With Prototype you have access to a variable Ajax.activeRequestCount (more info here)

    This contains, at any time, the amount
    of currently active AJAX requests
    (those created by Prototype, anyway),
    by monitoring their onCreate and
    onComplete events

    EDIT

    Untested but something like this should work:

    Ajax.Responders.register({
      onCreate: showProcessing,
      onComplete: hideProcessing
    });
    
    function showProcessing() {
      if(Ajax.activeRequestCount > 0){
            $('inProgress').show();
        }
    }
    
    function hideProcessing () {
      if(Ajax.activeRequestCount <= 0){
          $('inProgress').hide();
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is currently this Prototype code that does a PUT: new Ajax.Request(someUrl, { method:
In my project there are some 'Prototype' factories that create instances by cloning a
So I have a page that uses both Prototype and Mootools AJAX scripts. There
Is there a prototype fork that doesn't come with any DOM/ajax parts? I really
Prototype stores the number of active AJAX requests in Ajax.activeRequestCount . Is there something
I have a page that uses an AJAX request (using Prototype's Ajax.Request()) to validate
Firing events on every form field, I start a data control using prototype functions.
Is there a jQuery equivalent to this prototype code? Ajax.Responders.register({ onException: function(x,y) { if(y.message!=Syntax
I have a website that has lots of prototype.js ajax calls and now we
Have a set of prototype-enabled ajax code that is working in all browsers other

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.