-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At the top of your file, put:
<Cfsetting enablecfoutputonly="Yes">

Then for the rest of the page request (or until you do <Cfsetting
enablecfoutputonly="No">), ONLY stuff that's between <cfoutput> and
</cfoutput> will get sent out.  So this:

<Cfsetting enablecfoutputonly="Yes">
<!--- SillyPage.cfm --->

<Cfoutput>This is your page</cfoutput>

This isn't!

<!--- End SillyPage.cfm --->

Would result in only 17 bytes of output ("This is your page"), plus
headers.  The "This isn't!" part would never get sent out.

Hope that helps!

Best regards,
Zac Bedell

> -----Original Message-----
> From: tom muck [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 05, 2001 1:30 PM
> To: CF-Talk
> Subject: Re: CFHEADER questions
> 
> 
> Thanks for that link.  Very informative.
> 
> As to the other question:  I was mainly interested in it from 
> a practical
> point of view.  When I insert the code on the page from a 
> snippet, I always
> have to make sure that there isn't any whitespace, closing </body> or
> </html> tags, or any other tags after it, or they end up in 
> the file.  I
> just want to make sure the output gets cut off immediately.
> 
> tom
> 
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> ate.ky.us...
> > I'm not sure what you mean by stopping the output.  Do you 
> mean that you
> > might start working through a query (or something) and then 
> find that you
> > don't want to send the data to the user after all?  If so, 
> you could first
> > put all the data to download into a variable, then only do 
> the CFCONTENT
> if
> > you've decided the data are ok.
> >
> > I've used this sort of approach to create RTF files to 
> download to the
> > browser before; I wouldn't call it easy but it's certainly 
> possible.  More
> > info here: 
http://forums.allaire.com/devconf/Index.cfm?Message_ID=172003
>
> -----Original Message-----
> From: tom muck [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 05, 2001 10:21 AM
> To: CF-Talk
> Subject: CFHEADER questions
>
>
> I have some code on my page using <CFHEADER> and <CFCONTENT> that
allows
the
> download of a <CFOUTPUT> to a text file.  Is there anything I can use
on
> that page, aside from a <CFLOCATION> or <CFABORT> to stop the output
of
the
> server to the text file?
>
> Also, is there an easy way to create an RTF or Word doc on the fly
using
> this method?
>
> tom
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to