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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:19:40+00:00 2026-05-14T23:19:40+00:00

I am using the following code to get data from the database( from cs

  • 0

I am using the following code to get data from the database( from cs page itself i am creating the html code) and binding the html code to the div.

Problem:

If the database size is higher it takes some time to show the result. thet time i want to shoe a loading.gif image in that location. Once it get the data i have to hide the load image.

Edit:

Problem: Once it get hide, then the show() is not working.

 <div id="searchContainer" class="search_outer">
        <div id="Loading"></div></div>

Code:

    $.ajax({
                  type: "POST",
                  contentType: "application/json; charset=utf-8",
                  data: "{ searchText: '" + searchText + "', product: '" + product + "', category: '" + category + "', artist:'" + artist + "'}",
                  url: "Search.aspx/FetchSearchResult",
                  dataType: "json",
                  success: function(data) {  $("#Loading").hide(); $("#searchContainer").html(data.d[0]);}});


     $("#ajax-query-place").ajaxStart(function() {
                      $("#Loading").show();
                  });

Geetha.

  • 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-14T23:19:41+00:00Added an answer on May 14, 2026 at 11:19 pm

    The trouble is in your success: callback. When you do:

    $("#searchContainer").html(data.d[0]);
    

    You are overwriting the #Loading element because it is inside #searchContainer.

    Use append() instead.

    function(data) {  
        $("#Loading").hide(); 
        $("#searchContainer").append(data.d[0]);
    }
    

    Or just move the #Loading element outside of the #searchContainer element.


    EDIT:

    I’m guessing you don’t have an element called #ajax-query-place.

    You should use:

    $("#searchContainer").ajaxStart(function() {
         $("#Loading").show();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 495k
  • Answers 495k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You haven't shown that you're actually allocating dataTitleArray anywhere. Are… May 16, 2026 at 11:18 am
  • Editorial Team
    Editorial Team added an answer Apparently it doesn't do a select * ... at least… May 16, 2026 at 11:18 am
  • Editorial Team
    Editorial Team added an answer You could put a breakpoint in your controller action and… May 16, 2026 at 11:18 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Problem I tried using the following // Start method 1 var grbData = $.ajax({
Okay, so I've got the following code shown below to create a dialog using
I have created a table in ASP MVC and populate it with data from
I have a process in a website (Asp.net 3.5 using Linq-to-Sql for data access)
I am working on an ASP.NET page that we, in code impersonate the requesting
The user enters a product code, price and name using a form. The script
currently I have following code: home.php <form name='myformname' id='myformid'> <input type='text' name='mytext1' value='abc'> <input
I am making a simple Dynamic Website using PHP, where i allow the user
I'm trying to get at the best way to seperate the concerns of my
I have a database running on MS SQL Server 2005 and an ASP.NET 3.5

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.