Thanks for the code block Bryn. On Wed, May 19, 2010 at 5:02 PM, Bryn Parrott <bryn_parr...@internode.on.net > wrote:
> > >Dave, > > > >No, that's not the outcome desired, of course. I want the download window > to > >pop up and then when the accept the download, they are redirected. > > > >Maybe I can get close wrapping the cfdocument tag in a cfthread? > > > >Nando > > > > > > > Faced with a similar problem in CF 8 some time ago, I used some javascript > (not cflocation) at the bottom of the document like this: > <cfdocument filename="#tempfile#" format="PDF" pagetype="A4" > margintop="0.5" marginbottom="0.5" marginright="0.5" marginleft="0.5" > orientation="portrait" unit="cm" encryption="none" fontembed="Yes" > overwrite="Yes" backgroundvisible="Yes" bookmark="False" localUrl="yes"> > > <your pdf html code goes here....>. > . > . > </cfdocument> > <cfif fileexists(tempfile) and attributes.command eq 'file'> > <cfset thisresult = ordersobj.sendpdfquotefile(session.user, > client_order_id, tempfile)> > <cfif thisresult.insertsuccess> > <script language="JavaScript"> > alert("The Job Sheet PDF File has now been sent via > email"); > parentWin=self.opener; > parentWin.location.reload(true); > window.close(); > </script> > <cfelse> > <cfoutput> > <script language="JavaScript"> > alert("There was a problem generating and sending > the PDF file: #thisresult.msg#"); > window.close(); > </script> > </cfoutput> > </cfif> > </cfif> > > Do whatever you want in the Javascript...including 'window.location'.... > There is also the possibility of making use of the 'OnRequestEnd' event, > and perhaps you could do a cflocation in there if you are wedded to this > (but I have found that window.location works fine for me; as it acheives the > same end.) > > IHTH. > Bryn Parrott > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333837 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm