Creating a please wait dialog

  • Thread starter Thread starter Jeremy Chapman
  • Start date Start date
J

Jeremy Chapman

I have a button on my page which when clicked redirects to another page. on
the page load of the page that I've redirected to, there is a long query.
What I want to do is with dhtml, display test in the center of the screen
saying 'please wait..' so that the text displays until the new page is
returned. My problem is that the html is not visually updated because the
browser is busy waiting for the http request to complete. Is there any way
around this?
 
I don't think this will work for me because the contents of the original
page will disappear until the results of the new page appear. I want a
please wait dialog to display over top of the original page to make things
look seamless. I'm sure I can avoid using an intermediate page to achieve a
please wait dialog, somehow there must be a way to force the dhtml change
to visually update.
 
You may want to check out these 2 examples from
Dave Sussman's and Alex Homer's "ASP 1.1 Insider Solutions" :

http://www.daveandal.net/books/6744/loadpost/simplewait.aspx
http://www.daveandal.net/books/6744/loadpost/progressbar.aspx

There's links to source code in both,
and I think they do what you're looking for.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Jeremy Chapman said:
I don't think this will work for me because the contents of the original page will
disappear until the results of the new page appear. I want a please wait dialog to
display over top of the original page to make things look seamless. I'm sure I can avoid
using an intermediate page to achieve a please wait dialog, somehow there must be a way
to force the dhtml change to visually update.
 
I think this will do what I need. Thanks.
Unfortunately the refresh causes the little progress bar in the status bar
of the browser to disappear, so at first I thought my implementation wasn't
working, but it does seem to work. Thanks.
 
I think if you use javascritp is easier.

OnClick button you add attribute like this:

btnSave.Attributes.Add("onclick", "return PleaseWait()")

Javascript function is:

function PleaseWait(){
document.getElementById("LabelMsg").value='Please wait while your
request is being processed';
}

LabelMsg is your Label where you want to put your message While Wait.
 
Hi,

I have created a true MVC-pattern for ASP.NET that allows dialogs
windows in ASP.NET just like you would do when using WinForms.
I am using a technique called server-side-blocked calls (server-side
AJAX).
On my website there are four demos online and also a recording of a
live-coding-example (executable desktoprecording).

http://www.inchl.nl

The framework is freeware and is currently being applied in several
projects.
It's real cool, please tell all your friends about it!
It has saved me a lot of developping time.

Kind regards,

Stephan Smetsers
(e-mail address removed)
http://www.inchl.nl
 
Back
Top