<p align=\"left\"><b><font face=\"Arial\" size=\"2\">GFI MailSecurity's HTML 
threat engine found HTML scripts in this email and has disabled 
them.</font></b></p>Hmmm.  The only place I've seen this happen is with Firefox 
where it
opens a window, or tab, when you click a link that starts a download.

However, I have not seen this happen in IE.

Technically, I don't see how you can download a stream, then have the
browser take another action.  Usually, the page doesn't change, but you
get the "File Save" dialog box only.

M!ke

-----Original Message-----
From: Daniel Kessler [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 01, 2005 8:20 AM
To: CF-Talk
Subject: CFContent cancels out JS

I display a database (cfdump) with a "download database" button at the
top.  That'll take you to another page that downloads the database using
the table as a file_name.  This is done through cfcontent.
When I do this, it opens up a new window, so at the end of the CF  
code, I put some js, window.close(); to get rid of the window.   
Unfortunately, with cfcontent in the page, the window.close() is
ignored.  Remove the cfcontent and all is fine.

What is a good way to close this window then?

Here's my code:

<Xcript language="javascript"><!--
        function closeIt(){
                window.close();
        }
--></Xcript>

<CFQUERY NAME="retrieved_data" DATASOURCE="eatsmart">
        SELECT *
        FROM #url.table#
</CFQUERY>

<cfsetting showdebugoutput="No">
<cfoutput>
<cfheader name="Content-Disposition" value="inline;
filename=#url.table#.xls"> </cfoutput> <cfcontent
type="application/msexcel"> <cfset column_ar =
listToArray(retrieved_data.columnlist)>

<table border="1" cellspacing="0" cellpadding="0">
        <tr>
                <cfset column_ar =
listToArray(retrieved_data.columnlist)>
                <cfloop from="1" to="#arrayLen(column_ar)#" index="ii">
                        <cfset content = column_ar[ii]>
                
         <td bgcolor="##CBE4F4"><cfoutput>#content#</cfoutput></td>
                
                </cfloop>
     </tr>
<cfoutput query="retrieved_data">
     <tr>
                <cfloop list="#retrieved_data.columnlist#" index="col">
                <cfset content = retrieved_data[col][currentRow]>
         <td>#content#</td>
                </cfloop>
     </tr>

</cfoutput>
</table>
<Xcript language="javascript"><!--closeIt();--></Xcript>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222838
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to