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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Can not save perl GD graph as png on browser
by almut (Canon) on Apr 14, 2010 at 19:40 UTC

    When I use "save Image as" link on the Mozilla firefox, it saves the HTML for form instead of png code. (...)

    if ( !$cgi->param ) { ### The form goes here } else {

    What does the form look like?  Maybe the problem is you're using POST to send the parameters, so the URL associated with the image doesn't hold the paramaters, in which case I suppose the browser won't resend them when you "Save Image As...", which in turn means the CGI will send out the initial form again...  (I'm presuming the browser will try to reload the image from the server, and not read it locally from cache, as dynamically generated content by default isn't cached.)

    A couple of speculations... but anyhow, I would try GET instead.

      Thanks a Bunch!! Monk almut. using GET in startform worked. I will research GET and POST more. Regards, Rakhee
      Thank You, Monk almut I am using cgi.pm start_html and start_form functions and when I look at the browser source, I see POST as a method used. Can you please give me an example of how I can use GET using cgi.pm functions? Pardon my ignorance. Regards, Rakhee
Re: Can not save perl GD graph as png on browser
by ww (Archbishop) on Apr 14, 2010 at 18:16 UTC