u have to do an evaluate. look at it this way.  let's say i want to output
Form variables (which already have values) dynamically.  Let's say
Form.Item1 = "hi"  Form.Item2 = "how" and Form.Item3 = "who".  u must use
the EVALUATE function


<CFOUTPUT>
<CFLOOP index="number" from=1 to=3>
Evaluate('Form.Item' & number)<br>
</CFLOOP>
</CFOUTPUT>


  u get...
hi
how
who







-----Original Message-----
From: Ruslan Sivak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 10:34 AM
To: CF-Talk
Subject: Dynamic Structs


I'm trying to create a dynamic struct.  I have something like this

<CFSET form.session_prefix="somestring.">
<CFOUTPUT>Is It Defined -
#IsDefined("Session.#form.session_prefix#selected_locations")#</CFOUTPUT>
<CFIF NOT isDefined("Session.#form.session_prefix#selected_locations")>
        <CFSET
dummy=SetVariable("Session.#form.session_prefix#selected_locations",StructNe
w())>
</CFIF>
<CFOUTPUT>
        Is it a Struct -
#IsStruct("Session.#form.session_prefix#selected_locations")#
</CFOUTPUT>

It prints out:
Is It Defined - NO Is it a Struct - NO 

Whey doesn't it create the struct properly?

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

Reply via email to