0 Replies Latest reply on Sep 2, 2007 11:09 AM by Elcor

    Help with sendandload

    Elcor
      I am using some very basic code to send a text fields contents to my
      web server and get a response back. The send works perfectly, the perl
      on the other end writes the contents to a file, but I can not for the
      life of me figure out how to get the response back.

      Here is the sendandload code:


      function saveHTML() {


      mod0._visible = 0;
      mod1._visible = 0;
      mod2._visible = 0;
      mod3._visible = 0;
      mod4._visible = 0;
      mod5._visible = 0;
      mod6._visible = 0;
      mod7._visible = 0;
      mod8._visible = 0;
      mod9._visible = 0;


      dataSender.content = _root.statusbar.htmlText;


      dataReceiver.onLoad = function()
      {
      if (this.result == "true")
      {
      mod0._visible = 1;
      }
      else
      {
      mod1._visible = 1;
      mod2._visible = 1;
      mod3._visible = 1;
      mod4._visible = 1;
      mod5._visible = 1;
      mod6._visible = 1;
      mod7._visible = 1;
      mod8._visible = 1;
      mod9._visible = 1;
      }
      }


      dataSender.sendAndLoad("/class/testflash.pl", dataReceiver, "POST");



      }


      and my simple perl code for testing:

      #!/usr/bin/perl


      use Env;


      require "Modules/config.pm";
      require "Modules/general.pm";
      require "Modules/errors.pm";


      use CGI::Carp qw(fatalsToBrowser);


      &GetCookies;


      &ReadParse;


      open(FILE,">herewego.txt");
      foreach $temp (keys(%mycookies))
      {
      print FILE "$temp\t$mycookies{$temp}\n";


      }


      foreach $temp (keys(%in))
      {
      print FILE "$temp\t$in{$temp}\n";

      }


      close(FILE);

      print "result=true";
      exit;


      No matter what I do, change the perl, change the onLoad, I can never
      get the response back in the flash movie.