1 Reply Latest reply on May 14, 2009 1:48 PM by ATIF FAROOQ

    equivelant of this.text

    Seglespaan Level 1




      I have a textInput and on change I want to call a function, when I do so I want to pass the contents of itself and its id to the function.


      change="functionName(id, data )"

      change="functionName(id, text)"

      change="functionName(id, this.text)"


      all don't work.


      I can do it by using


      change="functionName(id, textInputId.text)"


      but just wanted to know if there was an equivelant to this.text in flex!



        • 1. Re: equivelant of this.text
          ATIF FAROOQ Level 3

          hi ,

             you can accomplish by this code



                            public function onChange(e:Event):void{
                           trace(e.target.name)////gives you id of textInput='me'
               <mx:TextInput change="onChange(event)" id="me"/>