• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • Last Modified:

display loading picture during sql processing

I want to display a Loading.. gif file in my ASP page at the time of sql query processing.

While opening a particular page, it is taking 1 minute time to display the content (with some HTML tables where the values coming from database) because of large sql queries in that page. So I want to display the Loading gif file first and once the resultset for the queries were received, I want to hide the loading gif file and display the results from the query.

  • 2
  • 2
1 Solution
b0lsc0ttIT ManagerCommented:
You actually would do this with Javascript or clientside script.  A simple and easy to apply method is like in the html below.  Notice the Response.Flush which sends the html to the browser even before the rest of the page is ready.  That html makes a basic "Loading page .... " message.  The message is hidden when the page loads using the onload event and Javascript.
Let me know if you have a question.  The message and other aspects are very basic and there are many variations of this.  However it will show you the basics and could be all you need.  If not then it will give you a start and something to respond to.

<meta HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
   <style type="text/css">
   	font-size: 9pt;
	font-family: Verdana, Arial;
	font-weight: bolder;
<body bgcolor="#FFFFFF" onload="document.getElementById('loader').style.display='none';">
Response.Write "<div id=""loader"" style=""margin: 0px auto; color: blue; font-size: 16pt;"">Loading page....</div>"

Open in new window

siva_gkAuthor Commented:
in case i have to display some gif file..?
siva_gkAuthor Commented:
thanks dude... i put the image inside the div tag and i got the things done :-)

b0lsc0ttIT ManagerCommented:
Great!  I am glad I could help.  Thanks for the interesting question, the grade and the points.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now