Ask a Question related to Macromedia ColdFusion, Design and Development.
-
chewba_71 #1
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 technology with mx 7.
Currently, I am using the coldFusion Flash Forms and actionScript for a simple
popup window displaying data. I am just testing this for for possible future
development.
The problem that I am having is this, I have a page in the form that has a
datagrid on it and I want to be able to export the information on the grid to
excel. So, I created a button that creates a popup that loads a coldfusion page
that has the content type set to excel. Below are snippets of the files.
This is the getURL call that creates the popup.
<cfoutput>
<cfsavecontent variable="pop">
getURL("javascript:window.open('index.cfm?fuseacti on=Popup.excel&report=Popup.De
tails&OppId=#oppid#', 'USToExcel', 'width=900,height=630, Scrollbars=1,
resizable=0'); void(0);");
</cfsavecontent>
</cfoutput>
<cfinput type="button" name="toExcel" value="To Excel" onClick="#pop#" >
This is the file that creates the excel page, minus some of the data.
<cfsetting enablecfoutputonly="Yes">
<!--- Set content type. --->
<cfcontent type="application/excel" reset="yes" >
<!--- Suggest default name for XLS file. --->
<!--- "Content-Disposition" in cfheader also ensures
relatively correct Internet Explorer behavior. --->
<cfheader name="Content-Disposition" value="filename=Schools.xls">
<style>
/* Style Definitions */
td.MsoNormal{
mso-style-parent:"";
border:thin solid #000000;
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
}
</style>
<cfoutput>
<table >
<tr>
<th class="MsoNormal">School Name</th>
<th class="MsoNormal">Parent Name</th>
<th class="MsoNormal">Enrollment</th>
</tr>
</table>
</cfoutput>
When I click the button that calls the getURL the new popup window opens for a
second then disappears. If I comment out the code that sets the excel page's
content type to excel the page displays the data fine. If I access the excel
url directly with the content type set to excel the page displays correctly
asking me to open or save the data. Only when I access the page with the getURL
is it failing. I tried removing the void(0); from the getURL command and then
it opens a new page displaying only (object). If I change the getURL to point
to the url directly instead of opening a new window it works correctly. ie
"getURL("index.cfm?fuseaction=Popup.excel&report=P opup.Details&OppId=#oppid#");"
works correctly. The problem is that I need it to be a popup.
I was hoping someone here would maybe know of a fix to this problem or maybe
has an idea of a work around. I can be email at [email]ltd_ed@yahoo.com[/email]
Thank You,
Mike
chewba_71 Guest
-
getURL flash in a Command, doesnt work.
I am trying to get a flash file displaying in a Command (or a floater, either would be preferable at this point!) and for the most part its working,... -
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. ... -
Disappearing type
I have a PDF file with 450+ pages that I've asembled from several files, but a group of the pages have invisible type. The pages have captions that... -
geturl command in flash-html combo site
Hi, I'm doing a site that has a flash intro. (To make it simpler, the flash intro site is www.website.com) Buttons in the intro should open up... -
Content Type = EXCEL in browser
I'm trying to change content type of an ASPX page in the browser and send some data so the browser mimics an EXCEL spreadsheet (changed the content... -
chewba_71 #2
Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command
Bump
chewba_71 Guest
-
chewba_71 #3
Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command
bump
chewba_71 Guest
-
chewba_71 #4
Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command
bump
chewba_71 Guest
-
chewba_71 #5
Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command
bump
chewba_71 Guest
-
chewba_71 #6
Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command
After doing some more research I have found this is only happening when the
open/save/cancel alert pops up. I set my browser to always open .xls files and
it works fine, but if I turn off the always open the popup comes up and then
the window disappears. I noticed that the default for the open/save/cancel
popup is cancel. Is it possible that the getURL function appends some type of
return after opening up a new window, and that is being taken by the browser as
hitting the cancel?
Thanks,
Mike
chewba_71 Guest
-
chewba_71 #7
Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command
bump
chewba_71 Guest
-
chewba_71 #8
Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command
bump. Have a great holiday weekend everyone.
chewba_71 Guest



Reply With Quote

