1 Reply Latest reply on Mar 29, 2008 9:53 PM by Gaurav J

    textarea qs.

    trycold Level 1
      Hi,

      I have a textarea in my app in which if pressed enter it executes some other function.

      I have it like this:

      <mx:TextArea xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="TextAreaSetUp();"
      text="Search Form" focusIn="this.text = ''" >
      <mx:Script>
      <![CDATA[

      import model.ApplicationModel;


      public function TextAreaSetUp():void {

      this.addEventListener(KeyboardEvent.KEY_UP, ButtonReturnPressed );
      }

      public function ButtonReturnPressed(evt:KeyboardEvent):void {
      if(evt.keyCode == Keyboard.ENTER) {
      DebugWindow.debug('this.text');
      DebugWindow.debugProps(this.text); }
      }
      ]]>
      </mx:Script>


      </mx:TextArea>

      Once the enter is pressed i need the value of the textarea in the above function. Above I tried using this.text but it keeps on appendng the value in the textarea. How can I get the textarea value.

      Thanks