Loading ...
Sorry, an error occurred while loading the content.

853RE: Response->Redirect

Expand Messages
  • Raghu.Nalamada@ubsw.com
    Nov 1, 2002
    • 0 Attachment
      Thanks Josh & Brock

      I have tried using Below

      my $Sdate = $Server->URLEncode("$Start_Date");
      my $Edate = $Server->URLEncode("$End_Date");
      my $url = $Server->URL('http://Test/Graph.pl', { Start_Date => $Sdate,End_Date => $Edate,Format => "$Format" });
      $Response->Redirect("$url")

      Iam retrieving the values in Graph.pl as CGI Parameter Value and iam getting the below for my SQl iam using and as u know is not a valid SQL

      Date between Apr%2001%202002 and Apr%2001%202002

      When i generate the Graph on Browser directly using Graph.pl?Start_Date=Apr+01+2002&End_Date=May+01+2002&Format="OBS"
      i get
      Date between 'Apr 01 2002' and 'May 01 2002' and Graph gets generated.

      Rather than trying to replace % with a space is there anyway i can rectify ?

      Regards

      Raghu


      -----Original Message-----
      From: K Broc Seib [mailto:bseib@...]
      Sent: Friday, November 01, 2002 11:40 AM
      To: Nalamada, Raghu
      Cc: asp@...; bseib@...
      Subject: Re: Response->Redirect


      Hi Raghu,

      Two things:

      (1) On passing args on a Redirect: I have had no problem passing
      them on as part of the url, like

      $params = {
      'name' => 'Fred',
      'wife' => 'Wilma',
      }
      $url = '/server/relative/path/script.pl'; ## or could be "http://blahblah/x"

      $full_url = $Server->URL($url,$params);
      $Response->Redirect($full_url);


      You may also need $Server->URLEncode() depending on if you have odd
      characters, like spaces, in your $param structure's keys or values.

      In addition, if you are passing around args from script to script
      that need to be preserved, you may have to pre-fill your $param struct
      using $Request->Params() and add/delete keys you need or don't want.

      Checkout apache-asp docs for:

      $Server->URL($url, \%params)
      $Server->URLEncode($string)
      $Request->Params()



      (2) Is your goal to have dynamic image appear within your pages? In
      that case, you should just include your image like it is any other
      image in your html document, but make the image's url point to your
      code, e.g.

      <img src="/path/to/your/script/make_png_image.pl">

      Then have your script 'make_png_image.pl' return the proper MIME type
      to your browser, perhaps 'image/png'. E.g.,

      my $im = new GD::Image(10,10);
      ## do the drawing with $im

      $Response->{ContentType} = 'image/png'; ## read about these
      $Response->BinaryWrite($im->png); ## read about these

      That's it in general; I didn't test any of that code, but that should
      convey the concept and point you toward the right routines to read
      about in the docs.

      Hope that helps.

      -broc



      > Hi All ,
      >
      > As i have been having problems with GD:Graph in Apache::Asp , I =
      > am generating the GD using a perl scripts and hence want to call the =
      > perlscripts like
      >
      > $Response->Redirect("http:\\testcmp:8080\scripts\gd.pl") , wanted to =
      > know if we could pass @args like Response->Include for passing CGi Query =
      > Paramters instead of constructing the Query Parameters like =
      > gd,pl?Start=3D"Yes"+End=3D"No".
      >
      >
      > Thanks
      >
      > Raghu

      Visit our website at http://www.ubswarburg.com

      This message contains confidential information and is intended only
      for the individual named. If you are not the named addressee you
      should not disseminate, distribute or copy this e-mail. Please
      notify the sender immediately by e-mail if you have received this
      e-mail by mistake and delete this e-mail from your system.

      E-mail transmission cannot be guaranteed to be secure or error-free
      as information could be intercepted, corrupted, lost, destroyed,
      arrive late or incomplete, or contain viruses. The sender therefore
      does not accept liability for any errors or omissions in the contents
      of this message which arise as a result of e-mail transmission. If
      verification is required please request a hard-copy version. This
      message is provided for informational purposes and should not be
      construed as a solicitation or offer to buy or sell any securities or
      related financial instruments.


      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Show all 7 messages in this topic