Click to See Complete Forum and Search --> : Page/Form Loading


Geat
02-12-2003, 04:43 AM
Not a major problem, just a bit of a niggle:

I've got a form with a bunch of selects on it. After the page loads the selects stay white for a second or so whilst they get populated - which kinda looks messy. Can you preload the page before displaying it?

gil davis
02-12-2003, 05:44 AM
<head>
<script>
function showPage() {
if (document.getElementById)
{document.getElementById("wait").style.visibility = "hidden";}
else
{if (document.layers)
{document.wait.visibility = "hide";}
else
{document.all.wait.style.visibility = "hidden";}
}
}
</script>
<style type="text/css">
#wait {position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-color: #FFFFCC; layer-background-color: #FFFFCC;}
</style>
</head>
<body onload="showPage()">
<div id="wait">
<table width=100% height=100%>
<tr><th>Please wait ... loading in progress</th></tr>
</table>
</div>
<script>
if(document.layers)
{document.wait.clip.width = window.innerWidth;}
</script>
<!-- the rest of your page goes here -->
</body>

Geat
02-12-2003, 05:52 AM
Ay Caramba!

Cheers.