Ask a Question related to Coldfusion Flash Integration, Design and Development.
-
saintsilver #1
using getURL with cfcontent and Excel files
I'm not sure if this should be a form question, a cfcontent question or a flash
question, so I apologize if this is not the proper place to post.
Here is the situation:
I have a flash form with a cfselect with
onchange=getURL('viewFile.cfm?requestedFile=someFi leLocation','_blank')
the viewFile.cfm page is:
<cfif Right(requestedFile,3) IS "xls" OR Right(requestedFile,3) IS "XLS">
<cfheader name="Content-Disposition" value="inline; filename=Report.xls">
<cfcontent type="application/vnd.ms-excel"
file="\\myServer\myFolder\#requestedFile#">
</cfif>
#requestedFile# is encrypted and decrypted before and after passing the value,
but I left that out for simplicity.
The result is:
Action Canceled
Internet Explorer was unable to link to the Web page you requested. The page
might be temporarily unavailable.
If I hit F5 or click reload, the XLS document will open (after Open, Save or
Cancel Dialog Box).
Any other file type seems to work fine, it is only .xls that is giving me
trouble.
If I create the same form as an HTML form using onchange=window.open etc.
the document opens as requested (again, after dialog box)
However, I need to use the Flash Form.
Has anyone experienced this before?
Thanks.
saintsilver Guest
-
Problems downloading Excel by using cfcontent andcfheader tags
I have a flash button which using getURL lauches the export of some data in Excel format. This works greate in Mozilla. But IE-6 displays typical... -
Cfcontent issue with sending data to excel over https
Iam trying to send some output data to excel sheet using cfcontent over https. but it doesnt seem to work properly due to an issue of CFCONTENT over... -
a Popup that has content type of excel is disappearing,only when created with getURL actionscript command
Hello, I am new to Flash and ActionScript, so please excuse me if this is something simple. I am a coldFusion developer using some of the new... -
Create Multiple Sheets in Excel with CFCONTENT
Hello, I am able to create an Excel Workbook using the CFCONTENT tag, but am wondering what is the secret to having multiple sheets within the... -
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 =... -
BKBK #2
Re: using getURL with cfcontent and Excel files
Two quick points. "XLS" is same as "xls" in Coldfusion, so no need to compare
for both. Use absolute path for the file attribute in cfcontent. Something like
this should work
<cfselect
size = "15"
required = "Yes"
query = "getData"
onchange="getURL('somePage.cfm?requestedFile=viewF ile.xls','_blank')"
value ="id"
display ="name"
<option value = "">Select All</option>
</cfselect>
somePage.cfm
===============
<cfif Right(url.requestedFile,3) IS "xls">
<cfheader name="Content-Disposition" value="inline; filename=Report.xls">
<cfcontent type="application/vnd.ms-excel"
file="c:/coldfusion8/wwwroot/testfile.xls">
</cfif>
BKBK Guest
-
saintsilver #3
Re: using getURL with cfcontent and Excel files
BKBK,
Thanks again for your help. I think what you are suggesting is essentialy the
same as what I have after it is processed. The only exception is that my excel
file is being loaded from a network share rather than from a folder on the C:
drive.
What I can't seem to understand is why the similar html version of the form
works fine, or why the flash form works when requesting a pdf document (<cfif
Right(url.requestedFile,3) IS "pdf"> etc.).
I'll take what you posted and play around a bit an see if I can make it work,
but please let me know if you know of anything else.
Thanks
saintsilver Guest



Reply With Quote

