3 Replies Latest reply on Dec 10, 2008 12:47 PM by ntsiii

    Submitting Form to a general web page

      I want to submit a simple flex form to a general web page such as PHP or JSP.

      I just want to convert this kind of source code in an HTML file into Flex file.

      <form action="a.php" ... >
      <input type=text ...>
      <input type=submit ...>

      After it submitted, the file a.php should be opened.

      Can anyone give help? (I am using Adobe Flex 3)

      Thanks in advance.
        • 1. Submitting Form to a general web page
          gallaharsha Level 1
          In flex you have various services through which you can submit your form. The mostly widely used is Http service.
          Seems you are new to flex. Here is a sample code of a simple form:

          • 2. Re: Submitting Form to a general web page
            Hurenjit Level 1
            Thanks for your help,
            but I tried this kind of examples, including this, several times.
            There was no response when I click on the button.

            If the URL was broken there was error,
            but if the URL was correct there was no reaction after the clicking.

            I also tried examples that opening new URL on a new browser window.
            There was no error message but It was not working.

            Again I also tried LinkButton, just to open a new URL:

            <mx:LinkButton label="LinkButton" click="openWindow()" id="linko" x="74" y="307"/>

            import flash.events.MouseEvent;
            import mx.controls.Alert;
            import flash.net.*;
            import flash.external.*;

            public function openWindow():void {
            var strFunction:String = "openWindow";
            var strURL:String = " http://www.cflex.net";
            var strCall:String = ExternalInterface.call(strFunction,strURL);

            It also not working, so I failed opening a URL even with this simplest method.
            How can I solve this problem?
            • 3. Re: Submitting Form to a general web page
              ntsiii Level 3
              Which do you want to do? Post data to a url or open a browser window?