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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:48:48+00:00 2026-05-17T21:48:48+00:00

I have 2 div one to load data from an ajax request and another

  • 0

I have 2 div one to load data from an ajax request and another to display Jquery dialog with gif image which says loading.

The jquery dialog is displayed when the page is requested while the ajax function gets the data from the controller. I want to close the dialog when the ajax function completes the request but not sure hot to do it.

here is the code

Page

<style>
.ui-dialog-titlebar-close{
    display: none;
}
</style>
<script type="text/javascript">

    $(document).ready(function() {

        //define config object
        var dialogOpts = {
            title:"Retreving Donation Details",
            modal: true,
            autoOpen: true,
            height: 200,
            width: 250,
            closeOnEscape: false,
            resizable: false,

        };
        $("#ajaxload").dialog(dialogOpts);    //end dialog

        $("#ajaxload").dialog("open");  

    });



</script>
//jquery dialog
<div id = "ajaxload" style ="display:none; background-color:Green; text-align:center;">
 <br /> 
   <img alt="loader" src = "../../Content/loader.gif" id = "loader" height="100" width        ="100" style = "margin:auto; text-align:center; vertical-align:middle;" />
</div> 

//Div to load data
<div id="dataload"><div>

Thanks in advance

  • 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-17T21:48:48+00:00Added an answer on May 17, 2026 at 9:48 pm

    You can close it when the ajax requests stop using the ajaxStop event, like this:

    $(document).ajaxStop(function() {
      $("#ajaxload").dialog("close");
    });
    

    When all concurrent jQuery AJAX requests finish, this event fires, and you can hide the dialog then. Another (same effect) format is to bind the event directly, like this:

    $("#ajaxload").ajaxStop(function() {
      $(this).dialog("close");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one aspx page with some controls. Also i have one DIV which
I have an absolutely positioned div containing several children, one of which is a
I am pulling data from a database with Ajax and dynamically populating a div
I have a div with two nested divs inside, the (float:left) one is the
I have the following snippet in one of my html pages : <div class=inputboximage>
I have a div in which a page is loaded with the DojoX Layout
I have a div with overflow:hidden , inside which I show a phone number
I have two XML sources to retrieve data from. I want to use them
I've previously used jquery-ui tabs extension to load page fragments via ajax , and
I am new to jQuery / AJAX. I have a page that uses colorbox

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.