Hi all,
        I have a question that sounds pretty stupid but here goes ... I have
created a file using CFFile on the fly from a query.
        Once created it is given an XLS suffix.  Then the cold fusion
template references that file via a hyperlink.
        The weird thing is that the first time you view the file it opens up
the file in the browser ok.
        BUT if you retry to open the file in the browser a second time, it
locks the browser - it appears to want to open the file but can't seem
        to do so.

        Has anyone else come across this problem and if so what is the
solution.
        Any information would be much appreciated  

        Below is a snippet of the code used to create the file:

        <cfset ResStr = chr(34) & "Guest Name" & chr(34) & chr(9) & chr(34)
& "Room Type" & chr(34) & chr(9) &
        chr(34) & "Occupancy" & chr(34) & chr(9)>

<CFFILE ACTION="write" FILE="#Variables.ReportPath#"
OUTPUT="#Variables.ResStr#" nameconflict="OVERWRITE">

<cfoutput query="x">
        <cfif x.smoking is "1">
                <cfset smoking = "Smoking">
        <cfelse>
                <cfset smoking = "Non Smoking">
        </cfif>
        
        <cfset ResStr = chr(34) & "#getRoomList.personFullName#" & chr(34) &
chr(9) & chr(34) & 
                "#getRoomList.Description#" & chr(34) & chr(9) & chr(34) &
"#getRoomList.occupancy#" & chr(34) & 
                chr(9) & chr(34) & "#dateFormat(getRoomList.ArriveDate)#" &
chr(34) & chr(9) & chr(34) &>
        <CFFILE ACTION="append" FILE="#Variables.ReportPath#"
OUTPUT="#Variables.ResStr#" nameconflict="OVERWRITE">
</cfoutput>

Regards

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to