Preloader problem i Netscape 6.x
Hvorfor placerer denne preloader sig, mens der loaders, i toppen af skærmen, dog højre/venstre centreret? Det er kun et problem i Netscape 6.xTeksten: "Preloading... Please wait" samt indikatoren er sat til at blive vist centreret på siden i både højde og bredde.
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="indhold.css">
<script language="JavaScript1.1">
<!-- begin hiding
/*
Preload Image With Update Bar Script (By Marcin Wojtowicz [one_spook@hotmail.com])
Submitted to and permission granted to Dynamicdrive.com to feature script in it's archive
For full source code to this script and 100's more, visit http://dynamicdrive.com
*/
// You may modify the following:
var locationAfterPreload = "selector.asp" // URL of the page after preload finishes
var lengthOfPreloadBar = 175 // Length of preload bar (in pixels)
var heightOfPreloadBar = 4 // Height of preload bar (in pixels)
// Put the URLs of images that you want to preload below (as many as you want)
var yourImages = new Array("images/border.gif", "images/border2.gif", "images/shadow2.gif", "images/shadow3.gif", "images/ok.gif", "images/ok2.gif", "images/info.gif", "images/logo.jpg", "images/logo2.jpg")
// Do not modify anything beyond this point!
if (document.images) {
var dots = new Array()
dots[0] = new Image(1,1)
dots[0].src = "images/black.gif" // default preloadbar color (note: You can substitute it with your image, but it has to be 1x1 size)
dots[1] = new Image(1,1)
dots[1].src = "images/blue.gif" // color of bar as preloading progresses (same note as above)
var preImages = new Array(),coverage = Math.floor(lengthOfPreloadBar/yourImages.length),currCount = 0
var loaded = new Array(),i,covered,timerID
var leftOverWidth = lengthOfPreloadBar%coverage
}
function loadImages() {
for (i = 0; i < yourImages.length; i++) {
preImages[i] = new Image()
preImages[i].src = yourImages[i]
}
for (i = 0; i < preImages.length; i++) {
loaded[i] = false
}
checkLoad()
}
function checkLoad() {
if (currCount == preImages.length) {
location.replace(locationAfterPreload)
return
}
for (i = 0; i <= preImages.length; i++) {
if (loaded[i] == false && preImages[i].complete) {
loaded[i] = true
eval("document.img" + currCount + ".src=dots[1].src")
currCount++
}
}
timerID = setTimeout("checkLoad()",10)
}
// end hiding -->
</script>
</head>
<body scroll="no" bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td valign="middle" align="center">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="180" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td><span class="tekst"><script language="JavaScript1.1">
<!-- begin hiding
// It is recommended that you put a link to the target URL just in case if the visitor wants to skip preloading
// for some reason, or his browser doesn't support JavaScript image object.
if (document.images) {
var preloadBar = ''
for (i = 0; i < yourImages.length-1; i++) {
preloadBar += '<img src="' + dots[0].src + '" width="' + coverage + '" height="' + heightOfPreloadBar + '" name="img' + i + '" align="absmiddle">'
}
preloadBar += '<img src="' + dots[0].src + '" width="' + (leftOverWidth+coverage) + '" height="' + heightOfPreloadBar + '" name="img' + (yourImages.length-1) + '" align="absmiddle">'
document.write(preloadBar)
loadImages()
}
// end hiding -->
</script> </span></td>
</tr>
<tr>
<td align="center">
<p class="tekst"><br>
Preloading... Please wait</div> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center>
</body>
</html>
