>- see footer for list info -<
try sticking a cfabort after your cfoutput.


Duncan Cumming
New Media Developer
Customer Relations Management / Education
Fife Council
700 4105 / 01592 414105

>>> [EMAIL PROTECTED] 27/04/2005 16:21 >>>
>- see footer for list info -<
Allan,

This works, sort of, but now I have my results in the top the CSV file
and
still the HTML of the page, is there a way to reload a results page
and
produce a download file?

-----Original Message-----
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Allan Cliff
Sent: 27 April 2005 15:46
To: Coldfusion Development
Subject: RE: [CF-Dev] Creating a CSV file in the users My Documents
folder

>- see footer for list info -<
Your query shoud be AFTER the cfcontent tag

-----Original Message-----
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Adams
Sent: 27 April 2005 16:37
To: 'Coldfusion Development'
Subject: [CF-Dev] Creating a CSV file in the users My Documents folder


>- see footer for list info -<
Hi,

I am trying to create a CSV file based on set of results returned by a
query. The user run the query, sees the results and then can decide to
download the results by clicking on the Download button. This then
causes
the page to reload, and then include a page which produces the
download. The
reason I reload the page is to allow the user to still view the
results.

TO produce the download CSV file I am using CFCONTENT and CFHEADER
like
this:

<cfheader name="Content-Disposition"
value="attachment;filename=#filename#">
<cfcontent type="application/csv">

But the problem I have is that the page downloading contains all my
HTML for
the page not just the results.

Here is the code I have in the produce download page:

 <cfoutput query="SimpleSearchQuery">
                #RSL#, #REPLACE(Name, ",", "","AlL")#, #Form_Type#,
#DateLoaded#, #DateValidated#
   </cfoutput>

<cfheader name="Content-Disposition"
value="attachment;filename=#filename#">
<cfcontent type="application/csv">

Does anyone know how I can stop the HTML being downloaded, or if there
are
any better ways to produce CSV files in CF 5.

Thanks

Stephen
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go
to
http://list.cfdeveloper.co.uk/mailman/listinfo 

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help

>-<

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go
to
http://list.cfdeveloper.co.uk/mailman/listinfo 

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help 
>-<

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go
to http://list.cfdeveloper.co.uk/mailman/listinfo 

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help -<


**********************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed and 
should not be disclosed to any other party. 
If you have received this email in error please notify your system manager and 
the sender of this message.

This email message has been swept for the presence of computer viruses but no 
guarantee is given that this e-mail message and any attachments are free from 
viruses.

Fife Council
Tel: +44 (0) 1592 414141
**********************************************************************

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to