Jump to content

cannot stream file to desktop from pop-up window


dmcdivitt

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.