By implementing the following code, you can display the spinning image until the page has fully loaded.
You need to do two things:
1. In header section, you need to implement following javascript code.
<script>
var body = document.getElementsByTagName(‘BODY’)[0];
if (body && body.readyState == ‘loaded’) {
AfterLoad();
} else {
if (window.addEventListener) {
window.addEventListener(‘load’, AfterLoad, false);
} else {
window.attachEvent(‘onload’, AfterLoad);
}
}
function AfterLoad() {
image.style.display=’none’;
}
</script>
2. After the <body> tag you need to show the loading image. (like, image.style.display=’ ‘;)
That is it.
HAPPY PROGRAMMING!