Can someone tell me what I did wrong in the following code? Thanks
[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Arai</title>
<script type="text/javascript">
function albumload() {
var album = new Array();
var i;
var pages = 2;
for (i = 0; i <pages; i++) {
//alert(i);
album[i] = new Image();
album[i].src = "picture"+i+".jpg";
// I have 2 pictures named picture0.jpg and picture1.jpg
// I am hoping to show the pictures on screen
// The debugger said the following code document.images..
// is null or not an object
document.images[i].src = album[i].src ;
document.write("<img src='images[i]'/>");
}
}
</script>
</head>
<body onload="albumload()">
<script type="text/javascript">
</script>
</body>
</html>[/HTML]