Creating a please wait dialog

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?
 
J

Jeremy Chapman

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.
 
J

Juan T. Llibre

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.





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.
 
J

Jeremy Chapman

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.
 
H

Hasan Imam

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.
 
S

Stephan Smetsers

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top