|
Im trying to put together a picture gallery using asp and javascript i want to use a repeat region all my files are showing but when i click the thumb nail the large image is not changing to the thumbnail i want to view any know what ive done wrong?
</script>
</head>
<p><img src="../../images/uploadedFiles/<%=(rs1.Fields.Item("Filename").Value)%>" name="large" width="300" height="200" border="0" align="middle"></p>
<p> </p>
<p> </p>
<table>
<%
startrw = 0
endrw = HLooper1__index
numberColumns = 3
numrows = -1
while((numrows <> 0) AND (Not rs1.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
%>
<tr align="center" valign="top">
<%
While ((startrw <= endrw) AND (Not rs1.EOF))
%>
<td><p> <a href="javascript:image_click(0)"><img src= width="150" height="110" name="pimage0" border=0></a>
<!---- THESE BLOCKS OF CODE CONTROL HOW THE IMAGES ARE DISPLAYED-->
<script language="JavaScript"><!--
//thumbnail script
image0 =new Image();
// These 3 lines define the source of the displayed images
image0.src ="../../images/uploadedFiles/<%=(rs1.Fields.Item("Filename").Value)%>"
// This defines the source of the preview image
document.images['pimage0'].src=image0.src;
// This defines what to do when an image is clicked on
function image_click(clicks)
{
if(clicks==0){document.images['large'].src=image0.src;}
}
// --></script>
|