troubleshooting Question

Coldfusion CFLOOP multiple lists.

Avatar of Bang-O-Matic
Bang-O-Matic asked on
ColdFusion Language
3 Comments1 Solution107 ViewsLast Modified:
Coldfusion / Mysql

I have a database field "photos" that holds a comma delimited string of photo URL's and feeds a slideshow.   the code below works,  but I also now have a field "thumbs" that contains another comma delimited string of photo URL's. I want to populate these as my thumbnail images instead of just using the large image as I have in the below code snip.  How would I accomplish this? Any help appreciated.


<!---this code works but doesnt uses the main photo as a thumbnail--->

<cfloop list="#photos#" index="ListItem" delimiters=",">
	
     <cfoutput>
	 <a class="rsImg" data-rsh="500" data-rsBigImg="#trim(ListFirst(ListItem))#" href="#trim(ListFirst(ListItem))#" alt="#details.AddressNumber# #details.AddressStreet#, #details.City#, #details.State# #details.zipcode#">
		<img width="96" height="72" class="rsTmb" src="#ListItem#" /></a> 
	</cfoutput>

</cfloop>




<!---this code doesnt work--->

<cfloop list="#photos#" index="ListItem" delimiters=",">
<cfloop list="#thumbs#" index="ListItem2" delimiters=",">
	

	 <a class="rsImg" data-rsh="500" data-rsBigImg="#trim(ListFirst(ListItem))#" href="#trim(ListFirst(ListItem))#" alt="#details.AddressNumber# #details.AddressStreet#, #details.City#, #details.State# #details.zipcode#">
		<img width="96" height="72" class="rsTmb" src="#ListItem2#" /></a> 

	</cfloop>
	</cfloop>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros