[code]<DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<noscript>
<meta http-equiv=”refresh” content=”1;URL=Index.html”>
</noscript>
<script language=”Javascript1.1″ type=”text/javascript”>
<!–
document.write(“<br><br><br><br><br><center><strong>HELLO</strong><br>Your browser will now cache site images…<br><br>”);
//Image preloading
var Images = new Array(3);
Images[0] = “Image1.jpg”;
Images[1] = “Image2.jpg”;
Images[2] = “Image3.jpg”;
//Preloads images via var array
for(x=0;x<Images.length;x++)
{
var preload = new Image();
preload.src=Images[x];
}
//Function for page redirection after images have been loaded
function doRedirect()
{
document.write(“Image caching completed…redirecting page”);
setTimeout(“window.location.href=’Index.html'”,3*1000);
}
//–>
</script>
</head>
<body onLoad=”doRedirect()”>
</body>
</html>
On line 24 is the logic error that i am arriving at. The page will not print the first document.write at the beginning of the script, but prints only the text from the function…am i missing something?