CFCONTENT Problem

2003-06-05 Thread David Sampson
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

"PK","CC","Country"
<.cfoutput query="qryCountries">
"#PK#","#CC#","#country#"
<./cfoutput>
<./cfif>
<.html>
<.head>
TESTER
<./head>

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


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


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

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

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



Sorting By Column

2002-09-26 Thread David Sampson

Earlier this week someone posted a link to Web Tricks
(http://www.webtricks.com/) for help with sorting an output table by
columns.  Great little application! Works fine! Thanks!

But... (you had to know there was a 'but'). When I query by a variable; get
a table of results; then, try to sort (using my newly installed
sort-by-column links), the entire page is reloaded, the query is run again
(this time without the form.variable) and the whole database is output!

How can I get it to sort by column using the variables originally passed?

David Sampson
Analyst/Programmer II
AK Department of Education & Early Development
907.465.2395 ph  907.465.8676 fx
[EMAIL PROTECTED]

FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists