Here's a working example: <!--- Read the file ---> <cffile action = "read" file = "/seedRequests.xls" variable = "xlsXML">
<!--- Set content-dispostion ---> <cfheader name="Content-disposition" value="attachment; filename=seedRequests.xls" /> <!--- feed the file to the browser ---> <cfcontent type="application/unknown" variable="#ToBinary( ToBase64( xlsXML.Trim().ReplaceAll( '>\s+', '>' ).ReplaceAll( '\s+<', '<' ) ) )#" /> On Tue, Oct 12, 2010 at 1:36 PM, Victor Moore <victor.mo...@gmail.com>wrote: > > I think I may end up using this approach, to open a new window. > > @Michael the variable is expected to contain binary data. In my case > is just a string. > > Thank you guys > Much appreciated > > Victor > > On Tue, Oct 12, 2010 at 1:11 PM, Tony Bentley > <cascadefreehee...@gmail.com> wrote: > > > > I usually locate to another page which holds the cfheader code. What ends > up > > happening when you locate to another page is you are never redirected and > > the page prompts to download. Doing it in jquery is unnecessary unless > you > > want to use a wait icon to ensure the processing is finished before > > locating, which then all you need is a > > document.location.href="page-to-cfheader.cfm"; > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338077 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm