Indomitus wrote:

My problem is that when I run the script in Internet Explorer, it tries to download the script and then when the script runs it tries to download the image.

I'm not sure I follow you. When using valid URL and you point your browser to a CGI, if the browser tries to download the script, this typically means that the Web server is not configured properly. In otherwords, it tries to send the script to the browser instead of executing it.

What I read in your post is that the Web server is sending the script and also executing it?

When I run the script in Mozilla or Netscape 4.7, it works fine, displaying the image in the browser with no problems.

Now I'm even more confused. You have specified in your header that the content disposition is "attachment". This means that you should be prompted with a download dialog box. This shouldn't be automatically displaying.

Side note:

while( <IMG>) { print; };

print takes a list (with an optional FH in front of it). Thus, you can do the following, which I think is cleaner:

print <IMG>;

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to (Ovid) Re: Displaying image to IE problem by Ovid
in thread Displaying image to IE problem by Indomitus

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.