Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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.

In reply to Re: Save results on web page to doc or txt by tomhukins
in thread Save results on web page to doc or txt by Wampa

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found