Have you tried to set a Content-Disposition header in the PHP script that
creates the PDF, asking the browser to "attach" the download? This way you
don't even need a new window.

Example from php.net/manual:

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');


On Mon, Mar 25, 2013 at 11:01 AM, Jim Giner <jim.gi...@albanyhandball.com>wrote:

> target as in the form attribute
>
> In my appl devl I utilize an extra window when my current form is asked to
> generate a pdf report.  Works well since that way the user can generate one
> report into a new window, read it, close it, and still have the reports
> menu in front of him/her and generate a 2nd report.
>
> I'm experiencing a problem tho and I'm guessing it's associated with ie9
> or FPDF. In my reports menu form, when I click on a button that will
> generate a pdf, I alter the form's target to create a new window.  This
> used to work last fall, but since then I have a new laptop running ie9, not
> 8.  The target changing js logic is working as far as I can see (alerts in
> my js) but the effect is not there.  Instead of a new window, the pdf opens
> up in the same window where the menu was and so when the user does a back
> he ends up going up one too many levels and has to re-request the reports
> menu.
>
> Didn't have this much trouble originally setting this up as I'm having now
> trying to debug this.  I'm using the FPDF extension/class to generate my
> pdfs - made no recent changes there.  Also my concept works very well still
> in a simple html document that has only two buttons on it which I created
> today to test a theory.  That is - maybe it's not just IE9, but FPDF.
>
> Anyone have any experience in this area?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to