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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:16:13+00:00 2026-06-15T08:16:13+00:00

I am using, Ajax load function in jquery to load another page in DOM.

  • 0

I am using, Ajax load function in jquery to load another page in DOM.
By using this

$('.upload').on('click',function(){

 $('.content').load('loo.php');

});

When i use this the page in division content loads after a 3-4 second Interval.

I wanted to show progress bar using that interval so i used this way

$('.upload').on('click',function(){

       $.ajax({
           url: 'loo.php',
         beforeSend:function(){

           res.container.append(res.loader); //Showing loader

         },
         success:function(){

            $('.content').load('loo.php');
             res.container.find(res.loader).remove(); //Hiding Loader 

               }

       });

});

So Now what happen is, loader comes and shows for few time and then page in division loads, But the problem is i again see delay in page loading after the loader hides. I created the loader to overcome the time but, still it takes time after the loader goes.

In firebug, by analysing request the page starts loading after the loader , which i don’t want.
Any idea, how to overcome this problem.

  • 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-15T08:16:14+00:00Added an answer on June 15, 2026 at 8:16 am

    you are removing the “loader” before the AJAX request is finished. you should remove the loader in a callback function, after the load() is finished. Also no need for double AJAX request.

    $('.upload').on('click',function(){
       res.container.append(res.loader); //Showing loader
      $('.content').load('loo.php', function(){
                 res.container.find(res.loader).remove(); //Hiding Loader 
    
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading a set of images from another page using jquery load() function.
On page load i'm sending one AJAX using jQuery .ajax function. After i got
So I have a system using jQuery AJAX to load the content dynamically. I
I'm loading part of my webpage using AJAX, in particular jQuery.load() . With this
I am using the jquery ajax api so load in some content, the code
I am using jQuery to load a page by AJAX using $.ajax (suppose test.html).
I am using jquery-ui tabs and ajax to load the content of the tabs.
I'm using jquery.load to pull in a fragment of html from another page. The
I have this jQuery code that retrieves external content using ajax, without refereshing the
I am using jquery's ajax loading function to load an external html. The external

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.