Results 1 to 4 of 4

Thread: Please wait message

  1. #1

    Thread Starter
    Hyperactive Member ARPRINCE's Avatar
    Join Date
    Mar 2003
    Location
    Pinoy in NJ
    Posts
    381

    Please wait message

    My page has a button to print reports. When clicked, a new window is displayed with the reports. Since the report takes time to render, I wanted to display a "Please wait" message first.

    I placed this on the page load and the "Please wait message" is displayed prior to the report being shown (see Page1 attachment).
    VB Code:
    1. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         Response.Write("<DIV><TD><B>Please wait...</B></TD></DIV>")
    3.         Response.Write(Space(256))
    4.         Response.Flush()
    5.         Response.Flush()

    However, when the report is shown, the "Please wait" message is still visible (see Page2 attachment). How do I remove this when page is done loading? How do I replace the Please wait message with an image instead?

    Thanks
    Attached Images Attached Images   

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Please wait message

    Use javascript for this. The page can start with the <DIV> showing the message. In the ONLOAD event of the body (body tag), hide the div layer.

  3. #3

    Thread Starter
    Hyperactive Member ARPRINCE's Avatar
    Join Date
    Mar 2003
    Location
    Pinoy in NJ
    Posts
    381

    Re: Please wait message

    I actually tried THIS CODE but it really does not give me the desired results.

    With this code, it takes a longer time to see the "PLEASE WAIT" message displayed on the page. Then when it does, it's like a blink only then the whole page is rendered basically defeating the purpose of the function.

    With the first code, once the page is redirected, I see the "PLEASE WAIT" immediately and then the whole page is displayed in total afterwards.

  4. #4
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: Please wait message

    What about using the same webform rather than displaying another window? Just a suggestion, but you could have your "please wait" message in an aspanel control which was hidden until the user clicks on your button...

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width