Try changing this...

<cfloop query="getproducts">
<img src="users/uploads/#getproducts.Image#" width="65" border="0"
onClick="document.image.src='users/uploads/#getproducts.Image#';"
style="cursor:pointer; "/> 
</cfloop>

To this...

<cfloop query="getproducts">
<img src="users/uploads/#Image#" width="65" border="0"
onClick="document.image.src='users/uploads/#Image#';" style="cursor:pointer;
"/> 
</cfloop>

Notice #getProducts.Image# vs #Image#

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com


-----Original Message-----
From: Rick King [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 20, 2007 4:02 PM
To: CF-Talk
Subject: Image swap with images from a database

I have a page with up to three thumbnails (populated from a DB). A larger
version of these images appears directly above the thumbnails. When the
thumbnails are clicked, the larger image changes appropriately. That's
working fine.

However, I'd like the user to then click on the larger image, and then a
pop-up window (or, ultimately, some sort of lightbox functionality when I
get this working) would open with the full size image.

I can get all this to work, but the pop-up window always displays the first
image returned in the query, regardless of which thumbnail was clicked. I'm
using document.image.src to swap the images.

Is there a better way to do this?
Thanks
Rick


<!--Large Image with popup-->
<td>
<div align="center" align="large_image">
          <a href="users/uploads/#getproducts.Image#" target="_blank">
          <img src="users/uploads/#getproducts.Image#" name="image" 
          width="250" border="0" >
          </a>
</div>
</td>

<!--Thumbnails-->
<td>
<strong class="titles">Additional Images: </strong><br> br /> <cfloop
query="getproducts"> <img src="users/uploads/#getproducts.Image#" width="65"
border="0" onClick="document.image.src='users/uploads/#getproducts.Image#';"
style="cursor:pointer; "/> </cfloop> </td>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281709
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to