in reply to Save results on web page to doc or txt
Just generate the plain text page and then set the content-type (CGI header method) to text/plain or application/ms-word. MS-Word will open and display the plain text just fine.
The only caveat being that some browsers (and we all know there really doesn't need to be an s on the end of browsers) totally ignores the content-type so you may have to also changed the extension of the file being delivered (.txt or .doc). There are ways to do this (mod-perl, re-directs, etc) but get the content-type approach working first and then jump the hoops only if you have to).
Update: I'm also assuming, you don't want the user to just use the File->Save As function of the browser after your results page is delivered to the browser - that would really be the easiest approach.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Save results on web page to doc or txt
by Wampa (Hermit) on Jul 13, 2004 at 12:11 UTC | |
by gsiems (Deacon) on Jul 13, 2004 at 13:58 UTC | |
by Wampa (Hermit) on Jul 14, 2004 at 05:35 UTC |