Rusian,
of course, its probably easier to write it this way though for example:
<CFSET varNumOfRecs = 20>
<CFSET varMyIndex = 0>
<CFLOOP condition="varMyIndex LTE #varNumOfRecs#">
<CFSET varMyIndex = "#varMyIndex#" + 1>
<UL>
<LI><CFOUTPUT>#varMyIndex#</CFOUTPUT></LI>
</UL>
</CFLOOP>
this would give you an unordered list counting from 1 to 20
you could write it the other way as well just make sure you remember that
when you nest a cfloop statement inside your <CFIF> you have to close it
before your <CFELSE> otherwise you'll get an extraneous tag error.
<CFIF something>
<CFLOOP parameters1></CFLOOP>
<CFELSE>
<CFLOOP parameters2></CFLOOP>
</CFIF>
cheers,
nelson
----Original Message Follows----
From: Ruslan Sivak <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: CF-Talk <[EMAIL PROTECTED]>
Subject: Conditional loops
Date: Tue, 16 Jan 2001 17:10:05 -0500
Received: from [207.31.122.140] by hotmail.com (3.2) with ESMTP id
MHotMailBC2E1B7D005FD82197AACF1F7A8C374C0; Tue Jan 16 14:51:50 2001
Received: from houseoffusion.com ([207.31.122.140]) by
www.houseoffusion.com (Post.Office MTA v3.5.3 release 223 ID#
0-54969U100L100S0V35) with ESMTP id com for
<[EMAIL PROTECTED]>; Tue, 16 Jan 2001 17:24:05 -0500
>From [EMAIL PROTECTED] Tue Jan 16 14:52:35 2001
Message-id: <[EMAIL PROTECTED]>
Is there a way to have conditional loops such as
<CFIF something>
<CFLOOP parameters1>
<CFELSE>
<CFLOOP parameters2>
</CFIF>
</CFLOOP>
Ruslan Sivak
Technologist
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists