I can't get any images to display in Mozzilla or IE using the code given. I have downloaded the code and image files from wrox. Please help.
here's the code.
Code:
<html>
<body>
<img name=img1 src="" border=0 width=200 height=150>
<script language="Javascript">
var myImages = new Array("usa.gif","canada.gif","jamaica.gif","mexico.gif");
var imgIndex = prompt("Enter a number from 0 to 3","");
document.images["img1"].src = myImages[imgIndex];
</script>
</body>
</html>