Cutter (CF_Talk) wrote:
> <cfloop index="i" from="1" to="4">
> <cfset variables.imagefield = evaluate("form.strImage#i#New")>
>
> <cfif isdefined("form.strImage#i#New")>
> <cfif len(variables.imagefield)>
> *
> * More processing stuff here
> *
> <cfset variables.image#i# = photo>
> <cfset variables.thumb#i# = thumb>
>
> <cfif len(form.strImage#i#)>
> *
> * Even more processing stuff
> *
> </cfif>
> </cfif>
> </cfif>
> <cfloop>
>
> What am I doing wrong?
I have no idea, because I don't know what the code is supposed to do.
But I think using the syntax below will make it easier to see what is
going on (and watch the extra quotes in the cfset statement):
<cfloop index="i" from="1" to="4">
<cfif isdefined("form.strImage#i#New")>
<cfif len(form["strImage#i#New"])>
*
* More processing stuff here
*
<cfset "variables.image#i#" = photo>
<cfset "variables.thumb#i#" = thumb>
<cfif len(form["strImage#i#"])>
*
* Even more processing stuff
*
</cfif>
</cfif>
</cfif>
<cfloop>
Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm