473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Long-running task: Show DIV with 'Please wait' message

Hi,

when I press the OK button of my dialog box a long-running task is
initiated. Therefore I would like to make visible a div section right after
clicking the button where a user-friendly message is displayed...

How can this be done? Can I make the section visible via server-side code?
Via Response.Write()?

Any examples would be appreciated!

Many thanks,
P.

Nov 19 '05 #1
5 3355
I something like use the following to accomplish this.

- A button on a web page is clicked by the user to initiate a long running
process (in my case a report in another window)
- The click event calls a "PleaseWait" page that displays a message about
the amount of time that is expected to elapse and a visible bar-ticker that
is incremented each second. This page also has a ReFresh META tag in it that
calls the "long processing page" after 3 seconds.
- While the long-running page is running on the server the user is
entertained by the moving bar in the browser. If the process takes more than
70 seconds I change the message on the screen to something like "Thank you
for your patience..."
- When the long-running page is finished processing it writes content to the
browser, replacing the PleaseWait page.

Nov 19 '05 #2
Man, I messed up that first sentence...oh well...

"Brad Roberts" wrote:
I something like use the following to accomplish this.

- A button on a web page is clicked by the user to initiate a long running
process (in my case a report in another window)
- The click event calls a "PleaseWait" page that displays a message about
the amount of time that is expected to elapse and a visible bar-ticker that
is incremented each second. This page also has a ReFresh META tag in it that
calls the "long processing page" after 3 seconds.
- While the long-running page is running on the server the user is
entertained by the moving bar in the browser. If the process takes more than
70 seconds I change the message on the screen to something like "Thank you
for your patience..."
- When the long-running page is finished processing it writes content to the
browser, replacing the PleaseWait page.

Nov 19 '05 #3
Put your div with your message on the page and set its style.display = "none"
absolutely positioned where you want it.

When the user clicks the button, set the divs style.display = "block" and
call your long process.

when you get a return value from the process swap the divs display style back.

OR use a popup element or a modal dialog.

If your leaving the page anyway Brad's Method is better.
"Brad Roberts" wrote:
Man, I messed up that first sentence...oh well...

"Brad Roberts" wrote:
I something like use the following to accomplish this.

- A button on a web page is clicked by the user to initiate a long running
process (in my case a report in another window)
- The click event calls a "PleaseWait" page that displays a message about
the amount of time that is expected to elapse and a visible bar-ticker that
is incremented each second. This page also has a ReFresh META tag in it that
calls the "long processing page" after 3 seconds.
- While the long-running page is running on the server the user is
entertained by the moving bar in the browser. If the process takes more than
70 seconds I change the message on the screen to something like "Thank you
for your patience..."
- When the long-running page is finished processing it writes content to the
browser, replacing the PleaseWait page.

Nov 19 '05 #4
Thank you both for your help!

Falcon, your solution seems to fit better as I don't want to navigate to
another page but to close the message box right after the task has ended.

I began to implement your method but unfortunately the div section shows up
only after the dialog page was posted back. (I show the div by calling the
server-side code 'this.PleaseWaitDiv.Visible = false;')

Is there a way to display the div BEFORE the page is posted back? Do I have
to use client-side code for this?

Thanks!
"falcon" wrote:
Put your div with your message on the page and set its style.display = "none"
absolutely positioned where you want it.

When the user clicks the button, set the divs style.display = "block" and
call your long process.

when you get a return value from the process swap the divs display style back.

OR use a popup element or a modal dialog.

If your leaving the page anyway Brad's Method is better.
"Brad Roberts" wrote:
Man, I messed up that first sentence...oh well...

"Brad Roberts" wrote:
I something like use the following to accomplish this.

- A button on a web page is clicked by the user to initiate a long running
process (in my case a report in another window)
- The click event calls a "PleaseWait" page that displays a message about
the amount of time that is expected to elapse and a visible bar-ticker that
is incremented each second. This page also has a ReFresh META tag in it that
calls the "long processing page" after 3 seconds.
- While the long-running page is running on the server the user is
entertained by the moving bar in the browser. If the process takes more than
70 seconds I change the message on the screen to something like "Thank you
for your patience..."
- When the long-running page is finished processing it writes content to the
browser, replacing the PleaseWait page.

Nov 19 '05 #5
Yes, Do it in javascript. Instead of launching your process directly have
your button (or whatever) have it call a client side function that shows the
div then launches the process.

"PontiMax" wrote:
Thank you both for your help!

Falcon, your solution seems to fit better as I don't want to navigate to
another page but to close the message box right after the task has ended.

I began to implement your method but unfortunately the div section shows up
only after the dialog page was posted back. (I show the div by calling the
server-side code 'this.PleaseWaitDiv.Visible = false;')

Is there a way to display the div BEFORE the page is posted back? Do I have
to use client-side code for this?

Thanks!
"falcon" wrote:
Put your div with your message on the page and set its style.display = "none"
absolutely positioned where you want it.

When the user clicks the button, set the divs style.display = "block" and
call your long process.

when you get a return value from the process swap the divs display style back.

OR use a popup element or a modal dialog.

If your leaving the page anyway Brad's Method is better.
"Brad Roberts" wrote:
Man, I messed up that first sentence...oh well...

"Brad Roberts" wrote:

> I something like use the following to accomplish this.
>
> - A button on a web page is clicked by the user to initiate a long running
> process (in my case a report in another window)
> - The click event calls a "PleaseWait" page that displays a message about
> the amount of time that is expected to elapse and a visible bar-ticker that
> is incremented each second. This page also has a ReFresh META tag in it that
> calls the "long processing page" after 3 seconds.
> - While the long-running page is running on the server the user is
> entertained by the moving bar in the browser. If the process takes more than
> 70 seconds I change the message on the screen to something like "Thank you
> for your patience..."
> - When the long-running page is finished processing it writes content to the
> browser, replacing the PleaseWait page.
>

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tim Clacy | last post by:
How is a 64 bit type defined in strict C++? It seems C has support for 'long long' since C99, but not so for C++? Looking through one compiler vendor's standard library headers has clouded the...
5
by: Mark Shelor | last post by:
Problem: find a portable way to determine whether a compiler supports the "long long" type of C99. I thought I had this one solved with the following code: #include <limits.h> #ifdef...
29
by: Richard A. Huebner | last post by:
Is the unsigned long long primitive data type supported in ANSI standard C? I've tried using it a couple of times in standard C, but to no avail. I'm using both MS VIsual C++ 6, as well as the...
4
by: Lingyun Yang | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Dear all, I have a file it's binary data viewed in UltraEdit is EF BB BF 0D 0A 3C ....... I want to read them into a int or long...
9
by: luke | last post by:
Hi everybody, please, can someone explain me this behaviour. I have the following piece of code: long long ll; unsigned int i = 2; ll = -1 * i; printf("%lld\n", ll);
12
by: wenmang | last post by:
Hi, I am using following Oracle Proc-C compiler: Pro*C/C++: Release 8.1.7.0.0 - Production on Thu Jun 15 15:57:32 2006 (c) Copyright 2000 Oracle Corporation. All rights reserved. I like to...
21
by: Charles Sullivan | last post by:
I maintain/enhance some inherited FOSS software in C which has compiler options for quite a few different Unix-like operating systems, many of which I've never even heard of. It would be...
12
by: Ahmad Jalil Qarshi | last post by:
Hi, I have an integer value which is very long like 9987967441778573855. Now I want to convert it into equivalent Hex value. The result must be 8A9C63784361021F I have used...
2
by: PengYu.UT | last post by:
Hi, In python, triple quote (""") can be used to quote a paragraph (multiple lines). I'm wondering if there is any equivalent in C++. For the following code, I could write the long string in a...
10
by: ratcharit | last post by:
Currently using cosine function in math.h Currently I get: 1 = cos(1e^-7) Is there another way for cos to return value of high accuracy say: 0.999999 = cos(1e^-7)
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.