AnsweredAssumed Answered

TypeError: this.functionName is not a function at HTMLSelectElement.<anonymous>

Question asked by Nadir_Hussain on Feb 7, 2019
Latest reply on Feb 8, 2019 by rscheitlin

Dear All

 

 i am calling the function _getAllFields().In startup it works but if i call this function on change event of selection box this through fallowing error.please help.

TypeError: this._getAllFields is not a function
at HTMLSelectElement.<anonymous>

 

startup: function() {
this.inherited(arguments);
this._getAllFields("Hello");------>this line function calling works.

$(document).on('change', '.form-control', function() {
if(this.id=="lyrSource"){
this._getAllFields(this.id);--------------------->through Error TypeError: this._getAllFields is not a function at HTMLSelectElement.<anonymous>

}//end of if

 

},//End of startup

 

_getAllFields:function(strLayerName){
alert(strLayerName);
},

Outcomes