I am new to Javascript programming. I have a page with four small
pictures. I want to click on a picture and have it open up larger in
a popup window.
this is what I am currently using to do this:
<html>
<!-- Generated by AceHTML Freeware http://freeware.acehtml.com -->
<!-- Creation date: 7/24/2003 -->
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title></title>
<meta name="descripti on" content="">
<meta name="keywords" content="">
<meta name="author" content="rd**** *@netzero.net">
<meta name="generator " content="AceHTM L 5 Freeware">
<script language= "Javascript ">
features ="height=325 , width=475";
function ViewPhoto(filen ame)
{
photo=window.op en(filename, "photos", features);
photo.focus();
}
<!-- hide script from older browsers
// end hiding -->
</script>
</head>
<body onunload=photo. close();>
<P ALIGN="CENTER"> <FONT SIZE="4">Click the pictures to make them
larger</font></p><br>
<a href="#" onclick=ViewPho to("images/DCP_0287.jpg")> <img
src="smpics\DCP _0287sm.jpg"></a>
<a href="#" onclick=ViewPho to("images/DCP_0245.jpg")> <img
src="smpics\DCP _0245sm.jpg"></a>
<a href="#" onclick=ViewPho to("images/DCP_0289.jpg")> <img
src="smpics\DCP _0289sm.jpg"></a>
<a href="#" onclick=ViewPho to("images/DCP_0288.jpg")> <img
src="smpics\DCP _0288sm.jpg"></a>
</body>
</html>
What is happening is that the old photo is showing before the new
photo is loaded. What I would like to have happen is to clear the
window of the old photo before the new one loads. Is that possible
with javascript and how would I do that?
this page is located at http://www.freewebs.com/glorybound/test3.htm
Thanks in advance for any help regarding this problem.