Here's a little snippet that I used yesterday that seems to do the trick -
not sure if the file write is necessary, but I was in a hurry and it works
on ie6

Bert

(ps #form.report_html# is an HTML page which they are supposed to save to
their pc)


<cfset temp_filename = GetTempFile(GetTempDirectory(),"tbf")>

<cffile action = "write"
        file = "#temp_filename#"
        output = "#form.report_html#"
        addNewLine = "No"> 

<cfheader name="Content-Disposition" 
        value="attachment; filename=tbfreport.htm">

<cfcontent type="application/unknown" file="#temp_filename#"
deletefile="yes">



> -----Original Message-----
> From: Kevin Roche [mailto:[EMAIL PROTECTED]] 
> Sent: 26 June 2002 12:10
> To: Fusebox
> Subject: FW: Mime types for file download
> 
> 
> -----Original Message-----
> From: Kevin Roche [mailto:[EMAIL PROTECTED]]
> Sent: 25 June 2002 17:48
> To: [EMAIL PROTECTED]
> Subject: Mime types for file download
> 
> 
> Hi,
> 
> I am trying unsucessfully to create a text file that is 
> downloaded to the users machine (with IE 5 browser).
> 
> I just get the text displayed in the IE window which is is 
> not what I want. I am trying to get a dialog box to display 
> asking for the directory/filename.
> 
> I have tried the following
> 
> 1  <CFHEADER Type="application/octet-stream">
> 
> 2  <CFHEADER Type="application/x-msdownload">
> 
> 3  <CFHEADER Type="text/plain">
> 
> All have the same effect.
> 
> In NS 4.7 the top two will create the dialog as required but not in IE
> 
> I also tried setting the header with:
> 
> <CFHEADER Name='content-type' 
> Value='application/octet-stream'> <CFHEADER 
> Name='content-disposition' Value='Attachment: filename=#filename#'>
> 
> I also tried appending the filename (file.dat) to the end of the URL.
> 
> Still no luck...
> 
> Anyone know why ?
> 
> Kevin
> 
> 
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to