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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:21:43+00:00 2026-06-11T02:21:43+00:00

I was going to call an ajax funciton, and was looking through the api.

  • 0

I was going to call an ajax funciton, and was looking through the api. I was curious if there is a function that can be carried out while waiting for the success, error, done, etc to be be called.

I was hoping there was something like :

$.ajax({
…,
waiting: function(){
//carry out some code
}
});

If it isnt in there already, it really should. Its not as smart in my mind to have to carry that stuff before the ajax function was called…

waiting could easily carry out something such as displaying a loading gif or something like that.

Is there anything out there that does this sort of functionality? I cant seem to find it.

  • 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-11T02:21:45+00:00Added an answer on June 11, 2026 at 2:21 am

    Try this

    jQuery.ajax({
        url:"http://www.example.com/",
        beforeSend:function(){
            //show loading gif
        },
        success:function(resp){
            //handle response from server
            //hide or remove loading gif
        },
        error:function(msg){
            //show error message
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Going slightly crazy here. I'm making an Ajax call using jQuery.post as follows: $.post('php/print.php',{data:dS},function(res){...
So I have this long function in jquery that includes a jquery ajax call,
I'm using Bing API to search for images by going the following call: http://api.bing.net/json.aspx?AppId=[my
So i need to run a jdbc call that is going against a sql
I am going to write a restful API, my requirement is to call methods
Going through happstack-lite tutorial : we build functions that have return type of ServerPart
I have a page that uses the following to submit a AJAX request: function
I have the following ajax call: $(#welcome a.close).click(function(e) { $.ajax({ type: GET, url: /visitors/hide_welcome,
I would like to have a function that returns the repsonseText of a jQuery.ajax()
I'm using wordpress. I make a ajax call with jQuery, PHP echos out a

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.