If you are trying to display it you don't have to do that even - just do
this:

 <cfsavecontent variable="sqlOutput">
   <cfinclude template="app_OUTPUT.cfm">
 </cfsavecontent>

 <cffile action="WRITE"
        file="c:\inetpub\hostroot\www.mySITE.com\files\#MyFile#"
        output="#sqlOutput#"
        addnewline="Yes">

<Cfcontent type="text/html">
<cfoutput>#sqloutput#</cfoutput>

In this case, cfcontent is superflous as well.

-----Original Message-----
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 9:28 AM
To: CF-Talk
Subject: RE: cfinclude inside a cffile tag?


Are you trying to generate a file that gets saved (HTML tags and all) to a
file or do you want to generate a file that gets displayed in the browser
(and the HTML gets rendered by the browser)?

If you want to save it, than the code that you posted should be fine.  And,
as an HTML file, you'd expect to see HTML tags when you open the file in a
text editor.  If you want to display it, than replace the word "attachment"
in the CFHEADER tag with "inline".

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -----Original Message-----
> From: Les Mizzell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 10, 2002 9:07 AM
> To: CF-Talk
> Subject: RE: cfinclude inside a cffile tag?
>
>
> Morning,
>
> Thanks for all your help on this so far. I've still got one more problem
> that I'm scratching my head over. The cfinclude template "app_OUTPUT.cfm"
> contains HTML formatting. However, when the file #MyFile# is
> generated, the
> HTML doesn't render - I'm actually seeing the raw HTML code in the file as
> below:
>
> <br>0001&nbsp;&nbsp;3.00 W
> <br>00ANN
> <br>01A01&nbsp;&nbsp
>
>
> Code below (thanks for your help) works perfectally except for the HTML
> rendering...
>
>
> <cfsavecontent variable="sqlOutput">
>   <cfinclude template="app_OUTPUT.cfm">
> </cfsavecontent>
>
> <cffile action="WRITE"
>       file="c:\inetpub\hostroot\www.mySITE.com\files\#MyFile#"
>       output="#sqlOutput#"
>       addnewline="Yes">
>
> <cfheader
>       name="content-disposition"
>       value="attachment; filename=#MyFile#">
>
> <cfcontent type="text/html"
>       file="c:\inetpub\hostroot\www.mySITE.com\files\#MyFile#"
>       deletefile="No" reset="Yes">
>
>
> Ideas??
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to