dmcdivitt Posted September 24, 2010 Share Posted September 24, 2010 I changed an edit screen to appear as a pop-up window. Previously everything was being done in the same window with too much navigation back and forth. Unfortunately I cannot stream a file to the desktop if invoked from a pop-up window. If I invoke the page directly by entering a URL address, it will stream a file to the desktop, but if rendered as a pop-up, when an attempt is made to stream a file, nothing happens. Streaming a file to the desktop is done as follows: header("Content-disposition: attachment; filename=$filename"); header("Content-type: document/pdf"); readfile($filename); return; This causes an open/save/cancel dialog to appear in the browser. Help would be appreciated. The browser used is IE. I can't try Firefox, since IE must be used for the ActiveX functionality, so I don't know if other browsers have a pop-up window limitation. Anyway, I have to make it work in IE. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/214259-cannot-stream-file-to-desktop-from-pop-up-window/ 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.