>- 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 -<
