5 Replies Latest reply on Jun 15, 2007 11:20 PM by boliz

    apparently it is impossible to send htmlText format using php

    boliz Level 1
      I try & try and apparently it is impossible to send "Rich Text Editor" htmlText to php and present it in a "TextArea" htmlText.
      If I alert the string it is good string.
      If I put it hard coded it is good.
      If I pass it with HttpService and try to read it back I faild!!

      My example: http://www.qed.co.il/adminPanel/dynamicTextAdmin.html

      my code:
      $text = $_GET["theText"];
      echo $text;

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical" width="100%" height="100%" >
      font-size: 14;
      import mx.messaging.messages.HTTPRequestMessage;
      import mx.rpc.events.ResultEvent;
      import mx.rpc.events.FaultEvent;
      import mx.rpc.http.HTTPService;
      import mx.controls.Alert;
      private var mySrv:HTTPService = new HTTPService();
      private var result:String ;
      public function sendText():void
      mySrv.url = " http://www.qed.co.il/adminPanel/fileWriter.php";
      mySrv.method = "GET";
      mySrv.useProxy = false;
      mySrv.addEventListener(ResultEvent.RESULT, httpResult);
      mySrv.addEventListener(FaultEvent.FAULT, httpFault);
      mySrv.resultFormat = "text";
      var params:Object = new Object();
      params.theText = rte.htmlText;

      public function httpResult(event:ResultEvent):void
      result = String(event.result);
      Alert.show("העדכון בוצע בהצלחה" + result);
      myText.htmlText = result


      public function httpFault(event:FaultEvent):void
      var faultstring:String = event.fault.faultString;
      Alert.show(" ישנה בעיה בחיבור לשרת "+faultstring);

      <mx:RichTextEditor id="rte" x="0" y="0" width="100%" height="100%" textAlign="right" fontFamily="Arial">
      <mx:HBox width="100%">
      <mx:Spacer width="100%" />
      <mx:Label text="צבע רקע" textAlign="right" fontFamily="Arial"/>
      <mx:ColorPicker id="rekaColor" enabled="{!rekaAlpha.selected}"/>
      <mx:HBox width="100%">
      <mx:Spacer width="100%" />
      <mx:Label text="רקע שקוף" textAlign="right" fontFamily="Arial"/>
      <mx:CheckBox id="rekaAlpha" selected="false" width="18"/>
      <mx:HBox id="cb" width="100%">
      <mx:Spacer width="100%" />
      <mx:Button id="sendBt" label="עדכן טקסט" click="sendText()" fontFamily="Arial" fontWeight="bold"/>
      <mx:TextArea id="myText" x="0" y="0" width="100%" height="100%" />