The most obvious thing is that the <cfset...> should be inside the <cfif...>

you should also use form["strImage#i#New"] instead of evaluate.

+-----------------------------------------------+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
TeleCommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
        - Thomas Paine, The American Crisis

"Let's Roll"
        - Todd Beamer, Flight 93



-----Original Message-----
From: Cutter (CF_Talk) [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 22, 2002 11:51 AM
To: CF-Talk
Subject: CFLOOP issues


*** Sorry if this is repost, still having mail server/client issues ***
Something new for me within CF so any help is greatly appreciated. I'm 
trying to loop through a number of form fields (form.strImage1, 
form.strImage2, form.strImage3, form.strImage4), do some checking, set 
some variables. But what I'm doing (and I've never done) must be off 
base. Here's an example:

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

Cutter


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to