Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Save results on web page to doc or txt

by tomhukins (Curate)
on Jul 13, 2004 at 12:09 UTC ( #373935=note: print w/replies, xml ) Need Help??


in reply to Save results on web page to doc or txt

It's not clear what you're trying to do here: it would help if you broke the problem down into small parts and told us where you're stuck, maybe sharing some of the things you have tried. You might find How to ask questions the smart way. helpful for getting the most out of this site.

Here's my guess at what you want to do:

  1. Display an HTML form to the user.
  2. Process the user's input.
  3. Generate feedback as plain text or a Word document.
  4. Return this feedback to the user somehow.

Assuming I've guessed correctly, you can perform each of these stages as follows:

  1. Use a templating system (you mention Embperl) to generate the form, filling in data as required. Alternatively, use CGI's HTML output features.
  2. Write a handler using CGI, mod_perl or whatever you use.
  3. You will find plain text easier and more widely supported. If you want prettier layout, use RTF or PDF instead. Only use Word documents if you absolutely must: in general you'll find RTF an acceptable, better supported substitute.
  4. Either return the document directly from your handler, setting the appropriate MIME type in the Content-type HTTP header field, or write the file to disk and reference it with a hyperlink. If you reference the file, you should write a cron job to clear up old files.
  • Comment on Re: Save results on web page to doc or txt

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:27 UTC

    Your assume is perfect. Step 1. and 2. I have. Step 3. and 4. I must do as you write. Thanks for your possible solutions.

    Programing in Embperl and all questions are related to Embperl.
    Excuse my bad English !!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://373935]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2021-01-23 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?