I'll preface this dodo-brain question by saying that I'm
completely sleep-deprived, half brain-dead and away from my home
base, references, etc.

Here's what I need to do: we are using CFFILE to write the
results of an order to a file. We are using CFSET to create a
variable called "textoutput". When I put CFLOOP in "textoutput"
and then reference it within CFFILE, all of my session variables
(from a shopping cart) get messed up and I get an error message
saying that my session variables are no longer there. (My
shopping cart is working fine elsewhere and I'm able to send the
looped session info via CFMAIL, so that probably isn't the
problem.)

Here's my code:

<cfset textoutput="
  Order:      #getMaxOrderID.MaxOrderID#

<CFLOOP INDEX="loopcount" From="1" To="#ArrayLen(session.cart)#">
  ITEM CODE:                #session.cart[loopcount][3]#
  VARIETY:                  #session.cart[loopcount][1]#
  QUANTITY:                 #session.cart[loopcount][4]#
</cfloop>

">

<CFFILE ACTION="Write"
    FILE="E:\websites\foo.txt"
    OUTPUT="#textoutput#">

I know I've been down this road before... is it possible to run
CF tags within CFFILE? Am I missing something really simple?

Any insight would be greatly appreciated!

Thanks in advance!!

Megan
[EMAIL PROTECTED]

Alpha 60 Design Shop
http://www.alpha60.com
phone: 202-745-6393
fax:   202-745-6394


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