in reply to Need to Save Files into Windows
No need for a new button. The button that the user pressed to launch the dynamic data generation is all you need. Then, when you're ready to return the newly generated data, preceed it with a disposition header:
It will cause the user's browser to open a dialog asking them what to do with it - open it or save it. The user selecting "save" will open the file save dialog.print "Content-Disposition: attachment; filename=$filename\n\n";
There are companion headers that can make it even more slick, such as content-length so the download dialog can display progress.
Forget that fear of gravity,
Get a little savagery in your life.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need to Save Files into Windows
by holli (Abbot) on Feb 03, 2005 at 17:14 UTC | |
by punch_card_don (Curate) on Feb 03, 2005 at 17:40 UTC | |
by holli (Abbot) on Feb 03, 2005 at 17:54 UTC | |
|
Re^2: Need to Save Files into Windows
by EchoAngel (Pilgrim) on Feb 03, 2005 at 16:31 UTC |