R
R
Romario212018-01-30 14:50:14
JavaScript
Romario21, 2018-01-30 14:50:14

ExtJS function call in callback(is not defined)?

Hello everyone, help me solve the problem, the ExtJS framework
The function is not called in the callback of another function

textFormater : function(text){
   //some code
},
loginForm : function(){
               //jQuery
               $("onClickBtn").click(function(){
                        var text = textFormater("SomeText"); //Uncaught ReferenceError: textFormater is not defined
             });

}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Mashletov, 2018-01-30
@Romario21

loginForm : function(){
                var me = this;
               //jQuery
               $("onClickBtn").click(function(){
                        var text = me.textFormater("SomeText"); //Uncaught ReferenceError: textFormater is not defined
             });

}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question