Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"page loading message" can it be tweeked

Status
Not open for further replies.

ghayman73

Technical User
Jul 3, 2002
55
FR
Hi im using this script for a page loading message, It works ok but it doesnt always wait for the complete images to load, i think it is only set up for one image and the problem is i have two. To further complicate this the images are variable so i cant just check to see if a certain imagename is loaded.
I dont know if I've explaind this clearly but you can see it in action here
:and just choose any combination and preview.

If possible I would like to load the complete page before the message is removed

Any help would be appreciated even to know its not possible.

This is the baisc scrpit that i have found:
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

<!-- Begin
function loadImages() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
document.hidepage.visibility = 'hidden';
}
else { // IE 4
document.all.hidepage.style.visibility = 'hidden';
}
}
}
// End -->
</script>

<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot; OnLoad=&quot;loadImages()&quot;>
<div id=&quot;hidepage&quot; style=&quot;position: absolute; left:0px; top:0px; background-color: #FFFFde; layer-background-color: #FFFFde; height: 100%; width: 100%;; border: 1px none #000000&quot;>
<table width=100% height=&quot;100%&quot;>
<tr>
<td height=&quot;277&quot;>
<div align=&quot;center&quot;>
<p><img src=&quot; width=&quot;213&quot; height=&quot;60&quot;></p>
<p> </p>
<p><font color=&quot;006600&quot; size=&quot;7&quot;>Your selection is loading </font></p>
<p><font color=&quot;006600&quot; size=&quot;7&quot;>Please wait ... </font></p>
</div>
</td></tr></table>
<div align=&quot;center&quot;></div>
</div>


I dont know if it makes a diffrence but the preview button actually calls a cgi script to choose which images have been selected.

Thank you
Grant
 
I think you'll have to load your images from inside your function. As it now stands, your function runs independantly of the image loading so it will be rare that the images load before the finction is finished. There's always a better way...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top