5 Replies Latest reply on Aug 12, 2008 12:24 AM by David_M..

    navigateToURL() POST Method...

    fender_acoustic Level 1
      I am trying to submit data to an ASP page via the navigateToURL() POST method, but when I try to reference the request variable.. it is blank. Any ideas what I am doing wrong?


      var url:URLRequest = new URLRequest(" http://www.mydomain.com/test.asp");
      var keyData:URLVariables = new URLVariables();
      keyData.name = "mike";
      url.data = keyData;
      url.method = URLRequestMethod.POST;

      On test.asp :

      if request("name") <> "" then
      response.Write request("name")
      response.write "No Data"
      end if

      Thanks for the help.
        • 1. navigateToURL() POST Method...
          BLXWebMaster Level 1
          Your post if fine. Try request.form.

          if request.Form("name") <> "" then
          response.Write request.Form("name")
          response.write "No Data"
          end if

          • 2. Re: navigateToURL() POST Method...
            ntsiii Level 3
            Hmm, asp is supposed to be able to read either form or querystring arguments using request("name") format.

            Are you actually "navigating" to the url?

            If not, and you are just sending data, then you should be using HTTPService or urlLoader.

            • 3. Re: navigateToURL() POST Method...
              Selvam_flex Level 1
              hi fender acoustic

              i too have the same problem navigateToURL fails sending data in POST while used in IFrame, if your application page in loaded in IFRAME and from their if you request navigateToURL using POST method data not sent but page popsup
              • 4. Re: navigateToURL() POST Method...
                levancho Level 3
                if you just need to submit data, and not actualy "navigateToURL" I why are you using navigateToURL to send post data, why cant you use, as Tracy suggested httpService?
                • 5. Re: navigateToURL() POST Method...
                  David_M.. Level 1

                  I encouter the same problem, when my application is launched from Flex Builder I can send parameters in Post to my servlet. I am using a URLRequest and navigateToUrl. I need to navigate to the url because the servlet send me a .doc file I must open.

                  When I execute the application from an IFrame, the servlet doesn't receive any parameters (it works if I send with the GET method). My problem is that I must use POST because the size of the parameters could exceed the max length allowed by the get method (1024).

                  Does someone have a workaround, to call navigateToUrl with the POST method when the swf file is hosted in a IFrame ? If there is not, is it a bug of flex, of the flash player or a security restriction ?