Jump to content

detect when page is done loading


bubazoo
 Share

Recommended Posts

Hey guys,I've seen on some websites, where they have a box that comes up that says something like"one moment please" while the page is loading, then disappears when the page is done loadinganyone know how this is done? thanks

Link to comment
Share on other sites

Simply put the message at the start of the body and with "onload" execute a script that will remove it from the DOM tree. Scince there's no DOM tree before the whole document is loaded, the message will be hidded after the page has finished loading.There's a bit of a problem for accessability here though. With JavaScript turned off, the message will remain after the page has finished loading.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...