halmorgan
03-20-2009, 08:22 AM
I am using frames to do a simple animation. I have two frames. The first frame is where the animation happens. The second frame has 4 images. The first frame will display each of the images for 5 seconds(parent.frames[1].document.images[0].src). I did not want to hard code the file names, but I was going to do a loop. This way I can use the code for a few projects I am planning. Here is how I am setting it up.
Frameset.html file contents
<html>
<title></title>
<frameset rows="200,*">
<frame src="image.html" name="top" />
<frame src="image-list.html" name="center" />
</frameset>
</html>
Image-list.html file contents
<html>
<head>
</head>
<body>
<img src="hat1.jpg"/><br/>
<img src="hat2.jpg"/><br/>
<img src="hat3.jpg"/><br/>
<img src="hat4.jpg"/><br/>
</body>
</html>
Image.html file contents
<html>
<head>
<title></title>
</head>
<body>
top=parent.frames[1].document.images[0].src
</body>
</html>
I am lost on this last file. I cannot get one picture to appear. I have tried it a ton of different ways. Please help me.
Frameset.html file contents
<html>
<title></title>
<frameset rows="200,*">
<frame src="image.html" name="top" />
<frame src="image-list.html" name="center" />
</frameset>
</html>
Image-list.html file contents
<html>
<head>
</head>
<body>
<img src="hat1.jpg"/><br/>
<img src="hat2.jpg"/><br/>
<img src="hat3.jpg"/><br/>
<img src="hat4.jpg"/><br/>
</body>
</html>
Image.html file contents
<html>
<head>
<title></title>
</head>
<body>
top=parent.frames[1].document.images[0].src
</body>
</html>
I am lost on this last file. I cannot get one picture to appear. I have tried it a ton of different ways. Please help me.