This topic is locked

binary thumbnail linked to larger binary image

2/5/2004 10:37:47 AM
ASPRunnerPro General questions
L
longhorn author

I reviewed the help doc on how to link a thumb nail to a large image. Howeever this only shows how to link file based images. I currently have binary thumbnails and binary images that I want to display just like the exampe. A thumbnail linked to a larger image. What is the best way to accomplish this?

Sergey Kornilov admin 2/13/2004

Hi,
here is how this can be done:

<TD>

<%

strImageWhere = "" & strKeyField & "=" & GetData(rsData.Fields(strKeyField), "")

%>

<a href="#" onClick="java script: pwin = window.open(null,null,'height=600,width=800,status=yes,resizable=yes,toolbar=no,menubar=no,location

=no,left=50,top=50,scrollbars=yes');

pwin.document.write('<img border=0 src=imager.asp?pictable=<%=HTMLEncode(strTableName)%>

&picfield=<%=HTMLEncode("Image1")%>&where=<%=HTMLEncode(strImageWhere)%>>');

pwin.document.write('
<hr size=1 noshade>

<a href=# onClick=\'window.close();return false;\'>Close window</a>');Â

return false;">

<img border=0 src="imager.asp?pictable=<%=HTMLEncode(strTableName)%>&

picfield=<%=HTMLEncode("Thumb1")%>&where=<%=HTMLEncode(strImageWhere)%>">

</a>

</td>


This snippet of code should be placed into loopRS function in ..._list.asp file.

In this example Thumb1 field holds thumbnail image while Image1 holds full-size image. Full-size image will be displayed in a popup window.