Click to See Complete Forum and Search --> : Page loading script question


robsta117
01-13-2003, 07:57 PM
Hi -

I incorporated a "page loading..." script into a pop-up that I formatted using CSS positioning. I uploaded the page and the script didn't appear to have run the "page loading" message. I'm using NS7/IE5 for Mac.

can I use this script as is with CSS positioning? Does the script <div id> need a z-index number?

Is there a way to make this script run?

Here's the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS (vers 1st May 2002 [Terry's build]), see www.w3.org">
<meta name="window-location" value="{ 40 4 556 792 }">
<meta name="targetted-browsers" value="NS4.0 NS6 IE4.0 IE5">

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Gilbert Davis -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- 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>

<style type="text/css">
#close {position: absolute; top:500px; left: 238px; width: 110px; height: 27px; z-index: 3}
#text {position: absolute; top: 480px; left: 36px; width: 280px; height: 27px; z-index: 2}
#img {position: absolute; top: 0px; left: 0px; width: 358px; height: 528px; z-index: 1}
</style>
<link href="../fond-regards2.css" rel="stylesheet" type="text/css">
<title>New Booties Close-up | **Close Window**</title>
</head>
<body OnLoad="loadImages()">

<div id="hidepage" style="position: absolute; left:5px; top:5px; background-color: #FFFFCC; layer-background-color: #FFFFCC; height: 100%; width: 100%;"> <table width=100%><tr><td>Page loading ... Please wait.</td></tr></table></div>
<!-- put the rest of your page contents here -->
<div id="text" class="smallprint">Shown:&nbsp;New Booties on Fabriano Medioevalis</div><br>
<a href="#"onClick="self.close();return false;" div id="close" class="body-link">Close window</div></a>
<div id="img"><img alt="Page loading... Please wait" src="NewBootiesCloseUp.jpg"></div>

</body>
</html>

Any and all suggestions welcome!

Regards,
Robsta

swon
01-14-2003, 12:41 AM
If I unterstood you correctly, this should do the trick:

<style type="text/css">
#close {position: absolute; top:500px; left: 238px; width: 110px; height: 27px; z-index: 3}
#text {position: absolute; top: 480px; left: 36px; width: 280px; height: 27px; z-index: 2}
#img {position: absolute; top: 0px; left: 0px; width: 358px; height: 528px; z-index: 1}
div.hidepage{position: absolute; left:5px; top:5px; background-color: #FFFFCC; layer-background-color: #FFFFCC; height: 100%; width: 100%; visibility:visible;}
</style>
<link href="../fond-regards2.css" rel="stylesheet" type="text/css">
<title>New Booties Close-up | **Close Window**</title>
</head>
<body OnLoad="loadImages() ">

<div id="hidepage" class="hidepage">
<table width=100%><tr><td>Page loading ... Please wait.</td></tr></table>
</div>
<!-- put the rest of your page contents here -->
<div id="text" class="smallprint">Shown: New Booties on Fabriano Medioevalis</div><br>
<a href="#"onClick="self.close();return false;" div id="close" class="body-link">Close window</div></a>
<div id="img"><img alt="Page loading... Please wait" src="NewBootiesCloseUp.jpg"></div>
</body></html>

I've put the visibility attribute to the hiding div and and a style class.

robsta117
01-14-2003, 02:52 PM
hi there!

Thanks for taking the time to respond to my post and for fixing the problem.

When I get finished on my current project today, I'll copy/paste the code you wrote into my original document, upload and check it out.

I'll let you know how it all turns out.

Was Switzerland caught in that cold and wet weather system that went through Europe earlier in the month? I hear from family in Europe that it's cold from Moscow to London.

Thanks again :) :)

robsta117
01-14-2003, 04:03 PM
Thanks Swon! It works nicely.

Robert :)

swon
01-14-2003, 08:44 PM
Yes, it's cold and wet, but we've got luck, it's not so extremly like the others, just about -10 Celsius and a little bit of snow

robsta117
01-14-2003, 10:50 PM
Glad you escaped the worst of the weather - the news reports from Germany and Poland showed very extreme weather, with flooding and bitter cold.

Thanks again for your help

Robert :)