0 Replies Latest reply on Nov 22, 2008 7:42 AM by alexdmi

    navigateToURL & request.data & connection problem

    alexdmi
      Hello and thank you a lot for your time.
      The function runs when a button is clicked.
      When the new webpage loads I get a "Internal Server Error" and
      "The server encountered an internal error or misconfiguration and was unable to complete your request."
      I've tried a lot of different configurations but none seems to work till now...

      private function onClick():void{
      var url:String = "https://someplace/cgi/web/sth.pl";
      var request:URLRequest = new URLRequest(url);
      var variables:URLVariables = new URLVariables();
      variables.Account = "000000";
      variables.Password = "password";
      variables.Second_Phone_Number = "0000000000000";
      request.data = variables;
      request.method = URLRequestMethod.POST;
      var array:Array = new Array(new URLRequestHeader("Content-Type", "text/html"));
      request.contentType = array.toString();
      navigateToURL(request, "_self");
      }

      the previous code is a tranformation of a fla file where there was a layer with this code:

      Account = "000000";
      Password = "password";
      Second_Phone_Number = "0000000000000";
      stop();

      and this code

      on (release) {
      // send variables in form movieclip (the textfields)
      // to email PHP page which will send the mail
      form.loadVariables();

      getURL("https://someplace/cgi/web/sth.pl", "_self", "POST");
      gotoAndStop(2);
      }

      Any help would be highly appreciated...