Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,
In our application, we are generating 2 types of reports. One is tabular & other is text. Tabular report is getting generated & displayed properly on the browser. But if I try to generate Text report, Instead of displaying the report on the browser, it prompts whether to save or open the file.
Is this the problem with browser settings? If so what is that I need to change?
Thanks in advance

2006-05-03 Retitled by g0n, as per Monastery guidelines
Original title: 'Problem in displayiing on the browser'

  • Comment on (OT) Problem in displayiing on the browser

Replies are listed 'Best First'.
Re: (OT) Problem in displayiing on the browser
by TedPride (Priest) on May 03, 2006 at 06:27 UTC
    You could just do HTML format for both and put <pre></pre> tags around your text. The advantage of this is you can display your reports as basic text - thus massively speeding up display time if your reports are large - but still insert images and markup wherever needed.
Re: (OT) Problem in displayiing on the browser
by NetWallah (Canon) on May 03, 2006 at 05:32 UTC
    Are you specifying a "Content-type" at the beginning of your TEXT report ?

         "For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken

      Yes. Content-type: text/plain\n\n for text report. Content-type: text/html\n\n for tabular report
Re: (OT) Problem in displayiing on the browser
by jesuashok (Curate) on May 03, 2006 at 05:59 UTC
    Hi

    This will happen in the following scenario also. If you have not coded your embeded HTML tags inside perl, you will get this error. To avoid this you have to re-look your HTML code which is responsible for creating the reports.

    "Keep pouring your ideas"
      This solved the problem. Thanks a lot