G
Gianni
If I run the following in FireFox, I am able
to change the picture in the iframe
by clicking on a thumbnail.
If I run it in IE, I am not able to change
the picture.
If I leave off the src="..." in the definition of the iframe,
then I am able to put a picture in the frame and
change it by clicking on the thumbnail.
What am I doing wrong? I want to start the iframe with
a picture in it and to be able to change it.
Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html xmlns="http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Iframes</title>
<style type="text/css">
#placeframe {
position:absolute;
top:18px;
left:220px;
}
img, p {
border: none;
margin: 0;
padding: 0;
}
</style>
<script language="Javascript" type="text/javascript">
<!-- Hide script from old browsers
function writeContent(imageno) {
parent.content.document.write('<img src="images/head'+imageno+'.jpg"
width="350" height="524" alt="head1" />')
parent.content.document.close()
}
// End hiding script from old browsers -->
</script>
</head>
<body bgcolor="#ddddff">
<div id="placeframe">
<iframe src="photos/head1.jpg" width="350" height="524" name="content"
align="left" frameborder="1" marginheight="0"
scrolling="no" >Your browser does not support iframes</iframe>
</div>
<p>
<a href="javascript:writeContent(1)" />
<img src="images/head1_thumb.jpg" width="50" height="75"
alt="head1 thumb" />
</a>
</p>
<p>
<a href="javascript:writeContent(2)" />
<img src="images/head2_thumb.jpg" width="50" height="75"
alt="head2 thumb" />
</a>
</p>
</body>
</html>
to change the picture in the iframe
by clicking on a thumbnail.
If I run it in IE, I am not able to change
the picture.
If I leave off the src="..." in the definition of the iframe,
then I am able to put a picture in the frame and
change it by clicking on the thumbnail.
What am I doing wrong? I want to start the iframe with
a picture in it and to be able to change it.
Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html xmlns="http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>Iframes</title>
<style type="text/css">
#placeframe {
position:absolute;
top:18px;
left:220px;
}
img, p {
border: none;
margin: 0;
padding: 0;
}
</style>
<script language="Javascript" type="text/javascript">
<!-- Hide script from old browsers
function writeContent(imageno) {
parent.content.document.write('<img src="images/head'+imageno+'.jpg"
width="350" height="524" alt="head1" />')
parent.content.document.close()
}
// End hiding script from old browsers -->
</script>
</head>
<body bgcolor="#ddddff">
<div id="placeframe">
<iframe src="photos/head1.jpg" width="350" height="524" name="content"
align="left" frameborder="1" marginheight="0"
scrolling="no" >Your browser does not support iframes</iframe>
</div>
<p>
<a href="javascript:writeContent(1)" />
<img src="images/head1_thumb.jpg" width="50" height="75"
alt="head1 thumb" />
</a>
</p>
<p>
<a href="javascript:writeContent(2)" />
<img src="images/head2_thumb.jpg" width="50" height="75"
alt="head2 thumb" />
</a>
</p>
</body>
</html>