Click to See Complete Forum and Search --> : Need to close and open multiple popups of different dimensions


pbritten
01-27-2003, 12:02 PM
Hi, All.

I've built an HTML page that displays a photo gallery of thumbnail images that when clicked open a new window that contains the larger view of the thumbnail.

I would like the new window to either resize to the new dimensions or close and reopen with new dimensions when the user clicks on each new thumbnail.

Any ideas will be sincerely appreciated.

Thank you kindly.

Pat

Charles
01-27-2003, 02:36 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<meta name="Content-Style-Type" content="text/css">
<title>Example</title>
<script type="text/javascript">
<!--
function openWin (url,height,width) {
win = window.open (url, 'child', 'height=' + height + ',width=' + width);
win.resizeTo(width,height);
win.focus();
return false;
}
// -->
</script>
<ul style="list-style-type:none">
<li><a href="http://www.bettiepage.com/images/photos/whip/whip6.jpg" onclick="return openWin(this.href,300,300)"><img alt="[Bettie With a Whip]" src="http://www.bettiepage.com/images/photos/whip/whip6_a.jpg"></a></li>
<li><a href="http://www.bettiepage.com/images/photos/whip/whip7.jpg" onclick="return openWin(this.href,300,205)"><img alt="[Bettie With a Whip]" src="http://www.bettiepage.com/images/photos/whip/whip7_a.jpg"></a></li>
<li><a href="http://www.bettiepage.com/images/photos/whip/whip8.jpg" onclick="return openWin(this.href,300,195)"><img alt="[Bettie With a Whip]" src="http://www.bettiepage.com/images/photos/whip/whip8_a.jpg"></a></li>
<li><a href="http://www.bettiepage.com/images/photos/whip/whip9.jpg" onclick="return openWin(this.href,300,197)"><img alt="[Bettie With a Whip]" src="http://www.bettiepage.com/images/photos/whip/whip9_a.jpg"></a></li>
</ul>

pbritten
01-27-2003, 02:52 PM
Thank you very much for this code, Charles. I truly appreciate your help.

All the best,

Pat