Displaying "Please Wait" and animated gif when server-side long process takes place

M

metsymani

In my web application, I have a search screen coded in ASP.Net. The Search process takes lot of time. So, I need to show a wait page informing the user that "Search is in progress. Please wait" along with an animated gif. I have placed a div in the search page which contains the message and animated gif. I hide the div by making "display: none" in the onload function of the body tag.

On click of the Search button(type = Submit), I call a javascript function that shows the div containing the wait page. In the serverclick of the Search button, the data records are fetched from the db and displayed in a grid in the page.

The problem is that on click of the Search button, when the serverside code is been executed, the animated gif stops animation as the server side process is taking place. I want the animation to continue, so that the user gets the feel that the search process is taking place.

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
C

Cor

Hi Metsy,

Try this sample, I hope that it is something you are looking for?

\\\Needs a download of LiveClock and a webform table with 1 row and 1 cell
on the form named Table1
Private Sub Page_Load(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles MyBase.Load
Dim str As String = "<script language=javascript " & _
"src='liveclock.js'>show_clock()</script>"
Page.RegisterClientScriptBlock("LiveClock", str)
Me.Table1.Rows(0).Cells(0).Text = _
"<script language='javascript'>new LiveClock();</script>"
End Sub
///
http://www.zip.com.au/~astroboy/liveclock/

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top