+ Start a Discussion

Alert message in PDF

Hi everyone,
I need a help in renderAs PDF concept. I am generating a PDF in an onclick of a custom button.I want to give an alert message asking the user "Do you want to save this PDF". If yes it gets saved to the associated custom object's Notes and Attachments, Else it remains in the generated PDF page. This process should happen immediately,when the PDF gets open.
The problem is that javascript Alert is not working once the PDF is downloaded.
Any suggestions will be helpful..
This should be doable. Could you please post your button code and controller code?