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

Discussion in 'ASP .Net' started by =?Utf-8?B?UG9udGlNYXg=?=, Feb 10, 2005.

  1. 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.
     
    =?Utf-8?B?UG9udGlNYXg=?=, Feb 10, 2005
    #1
    1. Advertising

  2. 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.
     
    =?Utf-8?B?QnJhZCBSb2JlcnRz?=, Feb 10, 2005
    #2
    1. Advertising

  3. 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.
    >
     
    =?Utf-8?B?QnJhZCBSb2JlcnRz?=, Feb 10, 2005
    #3
  4. 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.
    > >
     
    =?Utf-8?B?ZmFsY29u?=, Feb 10, 2005
    #4
  5. 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.
    > > >
     
    =?Utf-8?B?UG9udGlNYXg=?=, Feb 11, 2005
    #5
  6. 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.
    > > > >
     
    =?Utf-8?B?ZmFsY29u?=, Feb 11, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Julia
    Replies:
    2
    Views:
    978
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Nov 17, 2004
  2. Replies:
    2
    Views:
    563
  3. probashi
    Replies:
    3
    Views:
    1,484
    =?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
    Feb 18, 2005
  4. teggy
    Replies:
    0
    Views:
    829
    teggy
    May 29, 2007
  5. mvr
    Replies:
    4
    Views:
    240
    Curt_C [MVP]
    Jan 13, 2004
Loading...

Share This Page