R
Raymond Dunton
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="description" content="">
<meta name="keywords" content="">
<meta name="author" content="(e-mail address removed)">
<meta name="generator" content="AceHTML 5 Freeware">
<script language= "Javascript">
features ="height=325, width=475";
function ViewPhoto(filename)
{
photo=window.open(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=ViewPhoto("images/DCP_0287.jpg")><img
src="smpics\DCP_0287sm.jpg"></a>
<a href="#" onclick=ViewPhoto("images/DCP_0245.jpg")><img
src="smpics\DCP_0245sm.jpg"></a>
<a href="#" onclick=ViewPhoto("images/DCP_0289.jpg")><img
src="smpics\DCP_0289sm.jpg"></a>
<a href="#" onclick=ViewPhoto("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.
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="description" content="">
<meta name="keywords" content="">
<meta name="author" content="(e-mail address removed)">
<meta name="generator" content="AceHTML 5 Freeware">
<script language= "Javascript">
features ="height=325, width=475";
function ViewPhoto(filename)
{
photo=window.open(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=ViewPhoto("images/DCP_0287.jpg")><img
src="smpics\DCP_0287sm.jpg"></a>
<a href="#" onclick=ViewPhoto("images/DCP_0245.jpg")><img
src="smpics\DCP_0245sm.jpg"></a>
<a href="#" onclick=ViewPhoto("images/DCP_0289.jpg")><img
src="smpics\DCP_0289sm.jpg"></a>
<a href="#" onclick=ViewPhoto("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.