Open Sourcing DOS 4
2 days ago
If you have a page that takes long time to display it is a good idea to display a "wait page loads" image. This post show you how to implement this in your webpage.
To implement this you will need to:
1. Every time your page loads a "init()" function will load.
<body onLoad="init()">
2. Define a div named "loading" right after <body> section.
<div id="loading" style="position:absolute; width:100%; text-align:center; top:300px;">
The loading.gif image should be an animated gif that suggests that the page is still loading.
3. Place this javascript code right after you define the div.