The key to the popup is simply the popup.htm file and the appropriate link surrounding the thumbnail.
create and save this file as popup.htm (no changes necessary)
<HTML>
<HEAD>
<TITLE></TITLE>
<script language='javascript'>
var arrTemp=self.location.href.split("?");
var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
var NS = (navigator.appName=="Netscape")?true:false;
function FitPic() {
iWidth = (NS)?window.innerWidth:document.body.clientWidth;
iHeight = (NS)?window.innerHeight:document.body.clientHeight;
iWidth = document.images[0].width - iWidth;
iHeight = document.images[0].height - iHeight;
window.resizeBy(iWidth, iHeight);
self.focus();
};
</script>
</HEAD>
<BODY bgcolor="#000000" onload='FitPic();' topmargin="0"
marginheight="0" leftmargin="0" marginwidth="0">
<script language='javascript'>
document.write( "<img src='" + picUrl + "' border=0>" );
</script>
</BODY>
</HTML>
put this in the header of your php page (no changes necessary)
<script language="Javascript">
function PopupPic(sPicURL) {
window.open("popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
}
</script>
in your php page use this snippet where ever you have an image/thumbnail that you want to be a link to the popup. Obviously, lines 2 and 4 are the ones you will need to modify to reflect your actual image names and paths.
<a href="java script:PopupPic('
<?PHP echo $image_name2; ?>
')"><IMG SRC="
<? echo $image_name; ?>
" border=0></a>
clear?
Lite...