try placing the <cfloop> and </cfloop> tage both inside the <cfif> statement
ie
<CFIF LoopYes EQ True>
<cfloop index="count" from="1" to="10">
</cfloop>
<cfelse>
<cfloop index="theindex" from="1" to="2">
The index Is <CFOUTPUT>#theindex# </CFOUTPUT>
</cfloop>
</CFIF>
matt
-----Original Message-----
From: Angel Stewart [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 29, 2002 11:38 AM
To: CF-Talk
Subject: Looping depending on CFIF Statement
Hi all,
Any idea why I can't seem to wrap CFLOOP tags in CFIF statements?
I keep getting errors as though CF is totally ignoring the CFIF
statement and still parsing the </CFLOOP> tag.
Here is some simple sample code:
<CFIF LoopYes EQ True>
<cfloop index="count" from="1" to="10">
</CFIF>
<cfloop index="theindex" from="1" to="2">
The index Is <CFOUTPUT>#theindex# </CFOUTPUT>
</cfloop>
<CFIF LoopYes EQ True>
</cfloop>
</cfif>
Of course LoopYes is NOT equal to True.
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists