Force download to specific window
Moderator: General Moderators
-
lordrain11
- Forum Newbie
- Posts: 8
- Joined: Wed Nov 19, 2008 7:33 pm
Force download to specific window
I have some code that forces a download of a pdf file whent the user clicks a link. My issues is that it puts it in my current window so when the user is done with the pdf if they close it they have left the site. I really want the pdf to either open directly in acrobat or in a new browser window. I have heard that I can't control that with php so I tried another approach... When the user clicks the link it opens in a new window (Target _blank) which processes the code to force the pdf download. Problem is this new window is blank and the pdf opens in the orginal window. Is there a way to chnage which is the "parent" window or something so that it opens in the perfectly good blank window and leaves the orginal website alone? Perhaps it has to be javascript, I am open to all suggestions, thanks.
Re: Force download to specific window
aha your from phpfreaks too