I think I'll answer that with the time honoured "Figleaf Daves' .. Mime test
page"
http://www.figleaf.com/demo/mimetest/

if that page ever dissappeared there will be trouble... :-)

WG

-----Original Message-----
From: David Sampson [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 19:50
To: CF-Talk
Subject: CFCONTENT Problem


Once again I find myself running to you for help!  Boy am I glad you're
here!

Okey doke; I want to push the results of a query out to a delimited list (or
excel, or ms word) such that someone can click on a link and download a .txt
(.xls, .doc) file.

I'm able, using cfcontent tag to create a list and make it available for
download as a .cfm file.  How do I get it to download as a .txt (.xls,
.doc)?

Here's the code for my test page:

<.!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<.cfparam name="do" default="not yet">

<.cfif DO is not "not yet">
<.cfcontent type="application/msexcel">
<.CFQUERY NAME="qryCountries" DATASOURCE="Country">
SELECT      PK, CC, Country
FROM         dbo.tblCountries
</CFQUERY>
"PK","CC","Country"
<.cfoutput query="qryCountries">
"#PK#","#CC#","#country#"
<./cfoutput>
<./cfif>
<.html>
<.head>
        <title>TESTER</title>
<./head>

<.body>
here's a test of the cfcontent tag.<br>


<.a href="testpage.cfm?do=now">Country Codes</a>


<./body>
<./html>

This pulls a list of countries with their codes in a comma delimited list
but tries to save it as "testpage.cfm" not .txt (or .xls as you'd expect
from the mimetype of msexcel).

Thanks in advance for all your help,
David
David Sampson
Analyst/Programmer II
AK Department of Education & Early Development
[EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to