We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
I have a popup form action page that opens by using the form/target="_blank" attribute.
The new document does a database insert and then creates a PDF using the <cfdocument> tag.
I'm trying update some elements on the parent/opener form page as it is common for the client to continue using the parent, make some changes, and generate another PDF. If I comment out the <cfdocument> tag my code works fine, the parent document is updated as I expected.
I'm not sure how to proceed, help much appreciated!
Copy link to clipboard
What happens after the PDF is generated? Is it automatically downloaded to the browser? Have you tried using a hidden iFrame and some sort of modal notification to display that the file is being generated? You could have the iframe page trigger a parent function to update HTML and return the link to the PDF file (so that it isn't automatically downloaded). Files that are automatically downloaded performs a reset and any anything before the file download is ignored.
The PDF is the action page from my form. Adobe Reader (or the clients PDF reader) is the opener as the <cfdocument> tag make the server send the client a PDF file.
It seems once the template with a <cfdocument> tag opens, there is no DOM reference to the opener, since it's not an html file (that's my guess at this point anyhow).
I've decided I need to work on a solution that uses <cflocation> to get the client to the <cfdocument> tag instead of the <cfinclude> tag I'm using now. That way, hopefully, I can use the form/target CFML template to insert my database record, update the parent page, and pass the new record ID as a url variable to a third template that contains my <cfdocument> tag. Then I can query the new record to get the information the <cfdocument> needs to do the print job.
I'll report back.
<cflocation> has the same behavior??? If I comment out the cflocation tag the parent page updates, execute it and it does not.
I thought for sure it would work since I'm opening a new template.
Jamo, you the man! An <Iframe> tag did it.
Thank you so much.
Passing the BadgeID as a url variable did not work, but a session var worked fine.