Quantcast
Channel: Adobe Community : Popular Discussions - Reporting
Viewing all articles
Browse latest Browse all 38309

Close window

$
0
0
Here is my problem. I am using a Flex app to manage my data and to kick off reporting events. One of these reports is just an Excel dump. I am calling a file called Company_Excel.cfm to create the excel file. This works great. The only problem is after the Excel file is opened I am left with a popup window that has an "Action canceled" error message. How do I get rid of that window??? I have tried several variations of the following code to no success...

<script language="JavaScript">
function CloseMe(){ window.close(self); }
</script>

<A CLASS="H_Link" HREF="javaScript:window.CloseMe()">Close this window</A>

<CFINVOKE COMPONENT="/IREC_Flex/WebServices/SearchData" METHOD="GetCoNames" RETURNVARIABLE="CoNameList" CoName="#Form.CoName#"></CFINVOKE>

<CFHEADER NAME="content-disposition" VALUE="attachment; filename=Companies.xls">
<CFCONTENT TYPE="application/vnd.ms-excel">

<TABLE>
...
</TABLE>



I have also tried several versions of...


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

<html>
<head>
<title>Company Excel Dump</title>
</head>

<script language='javascript'>
var t;
function doLoad() {
t = setTimeout("window.close()",2000);
}
</script>

<body onLoad='doLoad()'>

<CFINVOKE COMPONENT="/IREC_Flex/WebServices/SearchData" METHOD="GetCoNames" RETURNVARIABLE="CoNameList" CoName="#Form.CoName#"></CFINVOKE>

<CFHEADER NAME="content-disposition" VALUE="attachment; filename=Companies.xls">
<CFCONTENT TYPE="application/vnd.ms-excel">

<TABLE>
...
</TABLE>
</body>
</html>

Any other ideas out there???
Thanks in advance for the help!!!

Have an Ordinary Day...
KomputerMan ~|:-)

Viewing all articles
Browse latest Browse all 38309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>