Allan_Shiels
asked on
Hide HTML page until loaded
Hi there,
I'm looking for a little bit of code that delays displaying my html page, until all the page is loaded.
That's it really :-)
I'm looking for a little bit of code that delays displaying my html page, until all the page is loaded.
That's it really :-)
and even simpler
<html>
<body style="display:none" onload="document.body.styl e.display= 'block'">
your content
</body>
</html>
works too
<html>
<body style="display:none" onload="document.body.styl
your content
</body>
</html>
works too
ASKER
spot on :-)
what would the be the best way to add in a 'data loading' message that displays as the page is loading, and then disappears to show the loaded page?
what would the be the best way to add in a 'data loading' message that displays as the page is loading, and then disappears to show the loaded page?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<html>
<body onload="document.getElemen
<div id="d1" style="display:none">
your content
</div>
</body>
</html>
or alternatively you could load the content of the page into hidden iframe and then reassign its innerHTML property value to innerHTML property of main window also on onload event