lordrain11 Posted December 18, 2008 Share Posted December 18, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/137615-force-download-to-new-window/ Share on other sites More sharing options...
RussellReal Posted December 18, 2008 Share Posted December 18, 2008 IN THE A TAG target="_BLANK" Quote Link to comment https://forums.phpfreaks.com/topic/137615-force-download-to-new-window/#findComment-719307 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.