Hi All,
I have a small application which uses frames to create our weekly newsletter.. It's pretty simple.
FRAME #1 has a standard HTML form, whose target is a 'generate_newsletter.php' file in FRAME #2
FRAME #2 either displays the output of the form processing, OR if the 'download' checkbox was checked in the FRAME#1/form, then starts a HTTP download (using Content-Disposition headers).
This all works fantastically, except for one small thing! Once you choose to download and you have gone through the process of downloading, you cannot ever go back to displaying the output, UNLESS the whole frameset is refreshed (and the form contents lost!)
The generate_newsletter.php file is pretty simple. It just builds a variable which contains a text string of the required output. Then depending on the 'download' checkbox, either echo's that to the screen (in FRAME #2) or issues the Headers
Header('Content-Disposition: attachment; filename=' . $filename .'.'. $ext);
Header('Content-Type: application/octet-stream');
and then echo's the output to the browser for downloading.
Any suggestions?