I guess I misunderstood the problem. Basically, what you are doing is
changing the big image on the left but not its link. Youll need to give the
link around the image an id and change its href when you change the image.

You could also just get rid of the link around the image all together and
use something like this in the onclick of the <img>
onclick="document.location.href=this.src"

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

-----Original Message-----
From: Rick King [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 21, 2007 10:29 AM
To: CF-Talk
Subject: Re: Image swap with images from a database

Hmmm...didn't seem to work when I change #getproducts.image# to #image#

You can see what is occurring here:
http://www.woreitonce.com/details.cfm?ProdID=173

Thanks again.




> 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>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281803
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