maybe not because of this reason.
except struct and array variable and cfloop, the code worked well.
for example:
<cfset my_text="this is my test text.">
<cfset Outputinfo="
<HTML><HEAD><TITLE>THISPAGE</TITLE></HEAD>
<BODY>
<table>
<tr>
<td>
#form.name#<br>
#my_text#
</td>
</tr>
</table>
</BODY></HTML>">
<CFFILE ACTION=WRITE FILE="NewFile" OUTPUT="#OUTPUTINFO#">
----- Original Message -----
From: "Adkins, Randy" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 1:02 PM
Subject: RE: CFFILE-WRITE
> You have to remember that with CF it reads
> the # signs as part of a variable thus you
> would get the error similar to variable not
> defined or something similar to the required #
> was not defined to close the variable.
> Since your VARIABLE OUTPUTINFO would actually be:
>
> <CFFILE ACTION=WRITE FILE="NewFile"
> OUTPUT="<HTML><HEAD><TITLE>THISPAGE</TITLE></HEAD>
> <BODY>
> <cfoutput><cfloop collection=">
>
> It interrepurts the " " as the closing of the CFFILE
> tag and there was no close #.
>
> My suggestion is to try to run a replace on the variable
> prior to putting it to the CFFILE.
>
> Replace the < with < and > with >
> and as well as the # with ASC(35) I think it is.
>
> and the " as " once you want to read the
> entire CF Code as it is written,
>
> you can se the Evaluate() function.
>
>
> -----Original Message-----
> From: Chang Liu [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 13, 2001 12:06 PM
> To: CF-Talk
> Subject: Re: CFFILE-WRITE
>
>
> yeah, exactly!
>
> but my outputinfo is:
>
> <cfset Outputinfo="
> <HTML><HEAD><TITLE>THISPAGE</TITLE></HEAD>
> <BODY>
> <cfoutput>
> <cfloop collection="#cart#" item="i">
> <table>
> <tr>
> <td width=""140"" align=center>#cart[i][2]#</td>
> <td width=""140"" align=center valign="bottom">#cart[i][4]#</td>
> <td width=""140"" align=center class="smtext2">#cart[i][5]#</td>
> <td width=""140"" align=center>#dollarformat(cart[i][3])#</td>
> </tr>
> </table>
> </cfloop>
> </cfoutput>
> </BODY></HTML>">
>
> <CFFILE ACTION=WRITE FILE="NewFile" OUTPUT="#OUTPUTINFO#">
>
> any ideas?
> the error message seemed like cffile couldn't transfer variables and
cfloop
> to text file.
>
> thanks again!
>
>
> ----- Original Message -----
> From: "Adkins, Randy" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Friday, April 13, 2001 11:42 AM
> Subject: RE: CFFILE-WRITE
>
>
> > Are you building a page that will contain something like:
> >
> > <cfset Outputinfo="
> > <HTML><HEAD><TITLE>THISPAGE</TITLE></HEAD>
> > <BODY>
> > <CFOUTPUT QUERY="this" DATASOURCE="That">SELECT * FROM
> > myTable</CFOUTPUT>
> > <CFOUTPUT QUERY="this">#THIS.MyField#<BR></CFOUTPUT>
> > </BODY></HTML>">
> >
> > <CFFILE ACTION=WRITE FILE="NewFile" OUTPUT="#OUTPUTINFO#">
> >
> >
> > OR something like:
> >
> > <cfset Outputinfo="
> > <HTML><HEAD><TITLE>THISPAGE</TITLE></HEAD>
> > <BODY>
> > THIS
> > DOG
> > RAN
> > FAST
> > </BODY></HTML>">
> >
> > <CFFILE ACTION=WRITE FILE="NewFile" OUTPUT="#OUTPUTINFO#">
> >
> > -----Original Message-----
> > From: Chang Liu [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 13, 2001 11:34 AM
> > To: CF-Talk
> > Subject: Re: CFFILE-WRITE
> >
> >
> > sorry, i didn't make it clear.
> >
> > this is my tag:
> > <cfset
> > ouputBody="<HTML>
> > <BODY>
> > i want to put struct and array variables and cfloop here
> > </body>
> > </html>">
> >
> > <cffile action="write" output="#ouputBody#">
> >
> > thanks!
> >
> > ----- Original Message -----
> > From: "Adkins, Randy" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Friday, April 13, 2001 11:13 AM
> > Subject: RE: CFFILE-WRITE
> >
> >
> > > Hopefully I am on the same sheet of what you are asking:
> > >
> > > Since the Output will be changing as the struct and array
> > > information changes, you can place output tags as an
> > > outer loop
> > >
> > > <cfoutput>
> > > <cfloop index=1 from=1 to=#whatever#>
> > > <cfset mycontent = #evaluate("employee." & whatever)#>
> > > <cffile action=append file="somefilename"
> > > output="#myoutput#">
> > > </cfloop>
> > > </cfoutput>
> > >
> > > Is this what you are asking for???
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Chang Liu [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, April 13, 2001 11:14 AM
> > > To: CF-Talk
> > > Subject: CFFILE-WRITE
> > >
> > >
> > > Hi all,
> > >
> > > I am using <cffile action="write" output="content">.
> > >
> > > I'd like to put coldfusion tags which include struct and array
variables
> > and
> > > cfloop to the OUTPUT as content.
> > >
> > > anyone know how to do this?
> > >
> > > please help, thank you in advance!
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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