3 Replies Latest reply on Feb 16, 2010 12:15 AM by Francisc

    JSON FLEX

    koutty Level 1

      hello

      i have a problem

      i retrieve data from sqlite

      and display on datagid

       

      i want to send these data to  php for   insert into  database 

      using   json

       

      private function sendPHPData():void
      {
      var objSend:Object = new Object();
      var dataString:String = JSON.encode(list.dataProvider.toArray());

      objSend.jsonSendData = dataString;
      sendData.send(objSend);
      }

       

      <mx:HTTPService id="sendData" url="http://localhost/testin/src/phpdb_json_tutorial2.php"
      useProxy="false" method="POST" resultFormat="text"
      result="updatedPHPDataResult(event)">

      <mx:ArrayCollection id="mydata"></mx:ArrayCollection>
      <mx:List id="list" dataProvider="{busCollection}" x="0" y="247" width="434"/>

       

      ERRORS

      [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Erreur de flux. URL: http://localhost/testin/src/phpdb_json_tutorial2.php" errorID=2032]. URL: http://localhost/testin/src/phpdb_json_tutorial2.php"]

       

      i NEED YOUR HELP PLEASE

        • 1. Re: JSON FLEX
          Gregory Lafrance Level 6

          You might need to set the --use-network=false compiler option.


          Project - Properties - Flex Compiler


          add --use-network=false to the "Additional compiler arguments:" section.

          Set it to true when you deploy your app to the server.

           

          If this post answers your question or helps, please mark it as such.


          Greg Lafrance - Flex 2 and 3 ACE certified

          www.ChikaraDev.com

          Flex / AIR Development, Training, and Support Services

          • 2. Re: JSON FLEX
            koutty Level 1

            hello

             

            thanks for the answer

             

            it s running....

             

            someone wants the full scripts? message me

             

             

            • 3. Re: JSON FLEX
              Francisc Level 3

              Don't forget to mark Greg's answer as correct if it was in fact so.

              It's so rare that he actually gets one right, it would be a pity not to.