Hi,
In this example I have two pages...with a form post inbetween.
The first page has a lot of text boxes called ID1 to ID16 (so, 16 in total
;) ).....these boxes are in a database loop (thus the number to
differentiate them). Also over time the number may change from 16 to 18
etc..so there may be more text boxes.
I also pass this total number (16) to the second page in a hidden field.
On the second page I want to evaluate the value for each one..but as the
total number is not a constant I need to do a loop.
The following code is what I have come up with :
<cfoutput>
<cfloop from="1" to="#Form.TotalEvents#" index="i">
#I#
<cfset varname ="Form.ID#i#">
<cfif #varname# eq "Custom">#varname# = Custom</cfif><br>
</cfloop>
</cfoutput>
.....end code.
What this is SUPPOSED to be doing is checking if the passed VALUE for
Form.ID1 (through 16) equals "Custom", and if so it does something, else
something else...
....but what it is doing is a literal comparison, so there are NEVER any true
results to the if statement, when infact with my current code 11 out of 12
should return true.
Can someone help me with this...it may be trivial to some of you..but I need
to get around this ASAP.
Thanks heaps!!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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