Ask a Question related to Coldfusion Database Access, Design and Development.
-
quiero mas #1
cfcontent - help please
Hi
In my database there is a field which has links to articles
#productdescription#- these articles have been saved as simple text.
When a user selects the month in which the article corresponds to I want the
text from the article to be displayed in a cfm page so that the user can read
it.
example
archive page
months - october november december
choose - october
october 's article is displayed.
I tried to do this using cfcontent and below is my attempt - things are not
working well please help
<cfif isdefined("id")>
<cfif isnumeric(id)>
<cfquery name="qGetItem" datasource="#application.ds#">
SELECT *
FROM oshimi_products
WHERE frn_category_id = frn_category_id</cfquery>
<cfif qGetItem.recordcount gt 0>
<table class="symtable"width="360px" >
<cfoutput query="qGetItem">
<tr>
<td>#ProductName#</td>
</tr>
<cfheader name="content-disposition"
value="attachment;filename=ProductDescription_#qGe tItem.ProductDescription#.doc">
<cfcontent type="application/msword"
file="#ExpandPath(".")#\ProductDescription_#qGetIt em.ProductDescription#.doc"
deletefile="yes">
</td>
</cfoutput>
</table>
</cfif>
</cfif>
</cfif>
message : cant find web page -
I used eascfm tutorial - [url]http://tutorial217.easycfm.com/[/url]
Thank you
quiero mas Guest
-
FLV and cfcontent
I've been attempting to use cfcontent to supply an FLV file to a flash application. I can't seem to get it to work. Does anyone have an example of... -
CFCONTENT
Hello, Is it possible to use <CFCONTENT> within a frame or table layout? seems when I run my code (which is a pop up window), the <cfcontent>... -
why use cfcontent?
Why would one use cfcontent insead of of using cfheader? Sorry if this eems like a daft question but they seem to be the same thing to me. -
CFcontent and zip files
Hi, All I am trying to do is this using cfcontent <cfcontent type = 'application/zip' file = ' E:\Inetpub\staging\TestRoot\test.zip' deleteFile =... -
CFCONTENT and SSL
I've read several online forums concerning the CFCONTENT - PDF problem but haven't seen anything similar to the problem I'm having... I'm... -
paross1 #2
Re: cfcontent - help please
Are you sure that you are not mixing apples with oranges? You state that "In my
database there is a field which has links to articles...", so my question is
are these "links" as in tHTML, or as in file system/directory locations on your
server? In other words, what is the typical value of
#qGetItem.ProductDescription# ? Your ExpandPath() function will give you the
absolute physical directory path, including the drive, to your "current"
directory, so if you are looking for a "link" instead, you maybe looking in the
wrong place.
Phil
paross1 Guest
-
quiero mas #3
Re: cfcontent - help please
Sorry Everyone who has been helping
I haven't been very clear
I want to pull a lot of text which is stored in the database and display it in
the body of the browser.
Currently what seems to be happening with the code below is that it opens ms
word. I know i have that designated but how do i do what i want to do?
I want to make an archive of articles. When the user clicks on the article
they want o read it is displayed in the browser as part of the web site.
I have file name as text.doc but there are more than one file.
search page
<cfquery name="qGetCategories" datasource="#application.ds#">
SELECT id, name
FROM Oshimi_categories</cfquery>
<cfif qGetCategories.recordcount>
<cfoutput query="qGetCategories">
<b><a href="oshimi_categoryDetail.cfm?id=#id#">#name#</a></b></cfoutput>
<cfelse>
<br><font size=2 face="arial">no articles available.</font>
</cfif>
result page
<cfquery name="qGetItem" datasource="#application.ds#">
SELECT *
FROM oshimi_products
WHERE frn_category_id = frn_category_id</cfquery>
<cfcontent type="application/vnd.ms-word" >
<cfheader name="Content-Disposition" value="attachment;
filename=persimmon.doc">
<cfoutput query="qGetItem">#qGetItem.ProductDescription#</cfoutput>
quiero mas Guest



Reply With Quote

