PDA

View Full Version : Click Thumbnail to view larger image


alanjones
07-25-2004, 07:29 AM
I am a newbie at ASP. I would like to know how, when a thumbnail is clicked, it will open a new window resized to the image size with a close window button centered at the bottom. I have gotten the JS from different coding sites but implementing the JS along with ths ASP is my issue.

My line of code is:

<td rowspan="3"><div align="center"><a href="http://www.wopcc.com/images/<%=strProductImagePath%>" target=_blank><img src="http://www.wopcc.com/images/<%=strProductImagePath%>" width="110" height="125" border="0" align="middle"></a>

I would appreciate any info.

Thank you,

Alan Jones

ubelt
07-30-2004, 08:15 AM
<SCRIPT language="JavaScript">
<!-- Begin
function popUp(URL,pWidth,pHeight,pLeft,pTop) {

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=" + pWidth + ",height=" + pHeight + ",left=" + pLeft + ",top=" + pTop + "');");
}
// End -->
</script>

======================================

You can set the height and width to the size of the image and align your Close button to the center.

the link looks something like this:

<a href="javascript:popUp('viewimage.asp',<%=imgWidth%>,<%=imgHeight%>,160,35)">