Wednesday, March 21, 2012

Question Loading Page

Hi! I have a thing in mind for my page, but can't see to figure it how can I do it, so if someone have done these, please let me know!!!

I want when loading the page, instead of waiting for everything to load, to show something saying... The page is Loading, please wait.

Like the Live messenger when it's loading, it has the message "Loading page" and just displays that, when the page is full loaded then it is shown...

Can someone help me with these?

thank you

Hi HoLLoW,

You can try starting with my example here:http://forums.asp.net/thread/1622218.aspx

It's not exactly what you need, but all you would have to do is add in your DIV that contains your loading message and have the style set to visibility:visible. In the onload event of the BODY tag you simply need to set visibility:hidden on your loading message and then unhide your content.

You could also try using the AlwaysVisibleControl (for your loading message DIV) from the AJAX Toolkit so if a user scrolls down the page they will still see your loading message.
http://ajax.asp.net/ajaxtoolkit/AlwaysVisibleControl/AlwaysVisibleControl.aspx

As soon as the page is finished loading, the BODY onload event script is executed, and your visibility settings are set.

Cheers,
Al

No comments:

Post a Comment