|
 |
|
Grizzled Veteran
Join Date: May 2002
Location: Houston, TX
Status:
Offline
|
|
I'm building a site for a relative. This site has a gallery with images of various sizes. I made a thumbnail for each image, those are all the same size. I allready have a javascript to open a pop-up window with the full-size image when the user clicks the thumbnail. What I need is a script to open a pop-up window that auto-sizes to the image it is displaying. Can anyone help with this? Here's what I have now:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:_ Eric King (eric_andrew_king@hotmail.com) -->
<!-- Web Site:_ http://redrival.com/eak/ -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function NewWindow0(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//_ End -->
</script>
</head>
<body bgcolor="#CCCCCC" text="#000000" link="#FF6600" vlink="#CC9966" alink="#FF0000"
leftmargin="0" topmargin="0" bgproperties="fixed" marginwidth="0" marginheight="0">
<div align="left"><a href="fullsizeimage.jpg" onClick="NewWindow0(this.href,'name3','500','500','yes');return false;"
<img src="thumbnailimage.jpg" width="150" height="150" border="0"></a></div>
</body>
</html>
|
|
|
| |
|
|
|
 |