I want to hide the body of my web page. Once the all content of the body tag of the web page are ready to display I want to show it body, but until that time I want to show some loading image.
If for some reason the content of the body does not load properly I want to show an error message.
What is the best way of doing this in javascript?