You are here: irt.org | FAQ | JavaScript | Frame | Q11 [ previous next ]
First, in the parent.html file:
<frameset cols="120,*"> <frame src="thumb.html" name="thumbFrameName"> <frame src="other.html" name="otherFrameName"> </frameset>
In the thumb.html file:
<script language="JavaScript"><!--
function loadPicture(pictureName) {
parent.otherFrameName.location.href = "other.html?" + pictureName;
}
//--></script>
<a href="JavaScript:loadPicture('big.jpg')"><img
src="small.gif" width=100 height=100 border=0></a>And finally in the other.html file:
<body bgcolor="#000000">
<center>
<script language="JavaScript"><!--
if (location.search.length > 0) {
document.write("<table height='100%' width='100%'>");
document.write("<tr><td align=center valign=middle>");
document.write("<img src='"+location.search.substring(1)+"'>");
document.write("<\/td><\/tr><\/table>");
}
//--></script>
</center>
</body>