OK, I'm not sure I understand this one correctly, so let me see...

app_OUTPUT.cfm is generating some content which includes HTML tags for
formatting.  You want to save this content to something.fnm, and then push
the file to the user where they can save it to their HD.  But, when the user
gets the file there should not be any HTML tags left in it... instead the
text should be formatted as per the HTML.  Is that right?

If so, you're going to have to handle the HTML rendering yourself, via CF
code.  CF doesn't know how to render HTML;  that's the responsibility of the
browser.  But you're trying to bypass the browser's rendering engine and
save the file straight to disk.  If the HTML code is simply some <BR> tags
and some &nbsp; entities, you can render the contents with a couple of
ReplaceNoCase() calls as in:

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

        <CFSET sqlOutput = ReplaceNoCase(sqlOutput, "<BR>", "#Chr(13)##Chr(10)#",
"ALL")>
        <CFSET sqlOutput = ReplaceNoCase(sqlOutput, "&nbsp;", " ", "ALL")>

        <cffile action="WRITE"
                ...

--
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 10:52 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)?
>
>
> Neither...
>
> The file is being pushed to the client to be saved as a properly formatted
> text file with the .fnm extension for opening and processing in another
> program. Don't want it to open in the browser.  The HTML that's
> in there is
> to get the formatting correct and can't appear in the
> output...some of which
> is pretty weird, like a certain value HAS to start at position 237 on a
> specific line (no wrapping)
>
> The cfinclude template "app_OUTPUT.cfm" will generate the proper
> output for
> me.... I then need to get that output into "WhateverFileName.fnm", which
> then gets pushed to the user to save.
>
>
> Thanks,
>
> Les
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to