Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Photo when thumbnail clicked

Status
Not open for further replies.

Kozimoto

Technical User
Sep 25, 2002
44
US
Hi everyone. I have 6 thumbnails displayed in a table 2 rows X 3 columns. Below that in one large cell I have the full-size photo. The paths to the thumbnails and the larger versions are store in a SQL database. When the details page loads, the larger photo should display the larger version of thumbnail #1.

What I need is a way to allow the user to click on the thumbnail and have the larger picture below change to the path of the corresponding larger photo.

I've been wingin' it to this point, but this one really stumped me. Any help would be appreciated.

Thanks in advance.
 
Stick this in the head of your doc
Code:
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

Then for each thumbnail use this
Code:
<a href="javascript:;" onClick="MM_swapImage('nameoflargeimage','','<%=rsImages.Fields.Item("largeImageFieldName").Value%>',1)"><img src="<%=rsImages.Fields.Item("SmallImageFieldName").Value%>" name="image1" width="400" height="301" border="0" id="start"></a>

Cheech

[Peace][Pipe]
 
Thank you very much for the reply. I finally wound up going with and their WONDERFUL Trans Linked extension. Only $25 and has transitions and so much more. It works perfectly for what I needed and thought I would share with the group.

But again, thank you Cheech for taking the time to respond to my request. I sincerely appreciate it.

kozi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top