Progress Bar or Waiting message

  • Thread starter Thread starter fabrice
  • Start date Start date
F

fabrice

I m looking for a solution to show a message when ma first page is loading.
It is the "home page" of the application.
And I'd like to give the message 'please waiting ...' during the loading.

I m working under framework 1.1 whith vb.net.
I have found out some solutions but none of then is working.

thanks for your help
fabrice
 
hi fabrice,
every browser i can think of will show a progress bar while the page is
loading, and there will be some 'waiting' icon going on in the browser too.
from a usability perspective, why clutter up the page with "loading..."
messages?

if you need to tell the user to wait while a long task is being performed on
the server, then in my opinion it is a more valid thing to do.

in any case, here is what you can do:
place a div tag like so: <div id='divLoading'> at the top of your page with
your "please wait... loading" message in it. then in your code-behind, you
can do something like:
ClientScript.RegisterStartupScript(typeof(string), "Load_Complete",
"document.getElementById('divLoading').display = 'none';", true);

this should hide the message as soon as all the HTML has been sent to the
client. if you want to wait until all the images have finished loading in
the page, then you should add the above javascript to the body onload event,
e.g. <body onload="document.getElementById('divLoading').display = 'none';">

hope this helps

tim
 
hi fabrice, apologies for my previous email, it had .net 2.0 code in it.
the 1.1 version of this code is:
Page.RegisterStartupScript("LoadingMessage",
"document.getElementById('divLoading').style.display = 'none';")

also, note the corrected javascript, with "style.display"



tim
 
Good evening,

Thanks for your help.
I m going to try the solutions and i will get you back the result ofthe
operation.
bye
have a a nice evening.

fabrice
 
Back
Top