<html> <head> <title>new Array 2</title> </head> <body> <img src="" alt="seat image 1" name="seatImg1" id="seatImg1" border="0"> <img src="" alt="seat image 2" name="seatImg2" id="seatImg2" border="0"> <img src="" alt="seat image 3" name="seatImg3" id="seatImg3" border="0"> <script> var myArray = new Array(3); for (i=0; i<3; i++) myArray[i] = new Image(); myArray[0] = "mandango/seat_avail.png"; myArray[1] = "mandango/seat_select.png"; myArray[2] = "mandango/seat_unavail.png"; alert("images are loaded"); document.getElementById("seatImg1").src = myArray[0]; document.getElementById("seatImg2").src = myArray[1]; document.getElementById("seatImg3").src = myArray[2]; </script> </body> </html>