<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TypeError: this.functionName is not a function at HTMLSelectElement.&amp;lt;anonymous&amp;gt; in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132736#M3796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Dear All&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;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.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TypeError: this._getAllFields is not a function&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; at HTMLSelectElement.&amp;lt;anonymous&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;startup: function() {&lt;BR /&gt; this.inherited(arguments);&lt;BR /&gt;this._getAllFields("Hello");&lt;STRONG&gt;------&amp;gt;this line function calling works.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$(document).on('change', '.form-control', function() {&lt;BR /&gt;if(this.id=="lyrSource"){&lt;BR /&gt;this._getAllFields(&lt;SPAN&gt;this.id&lt;/SPAN&gt;);&lt;STRONG&gt;---------------------&amp;gt;through Error&amp;nbsp;TypeError: this._getAllFields is not a function&amp;nbsp;at HTMLSelectElement.&amp;lt;anonymous&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;}//end of if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;},//End of startup&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_getAllFields:function(strLayerName){&lt;BR /&gt; alert(strLayerName);&lt;BR /&gt; },&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2019 11:41:33 GMT</pubDate>
    <dc:creator>NadirHussain</dc:creator>
    <dc:date>2019-02-07T11:41:33Z</dc:date>
    <item>
      <title>TypeError: this.functionName is not a function at HTMLSelectElement.&lt;anonymous&gt;</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132736#M3796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Dear All&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;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.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TypeError: this._getAllFields is not a function&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; at HTMLSelectElement.&amp;lt;anonymous&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;startup: function() {&lt;BR /&gt; this.inherited(arguments);&lt;BR /&gt;this._getAllFields("Hello");&lt;STRONG&gt;------&amp;gt;this line function calling works.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$(document).on('change', '.form-control', function() {&lt;BR /&gt;if(this.id=="lyrSource"){&lt;BR /&gt;this._getAllFields(&lt;SPAN&gt;this.id&lt;/SPAN&gt;);&lt;STRONG&gt;---------------------&amp;gt;through Error&amp;nbsp;TypeError: this._getAllFields is not a function&amp;nbsp;at HTMLSelectElement.&amp;lt;anonymous&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;}//end of if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;},//End of startup&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_getAllFields:function(strLayerName){&lt;BR /&gt; alert(strLayerName);&lt;BR /&gt; },&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 11:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132736#M3796</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-02-07T11:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: this.functionName is not a function at HTMLSelectElement.&lt;anonymous&gt;</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132737#M3797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Your issue is that the scope of "this" inside the change event of select is the select not the widget as you need it to be to get to your&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;_getAllFields function. I don't understand why people are using jQuery in their widgets when you already have dojo as part of the JS API. Your code for getting the select (and whatever else you are using jQuery for) can easily be done in dojo with out adding another heavy third party library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;define&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'dojo/query'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;'dojo/on'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;

&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;query&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'.form-control'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'change'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="comment token"&gt;//Now "this" is the widgets scope and you can get to your function.&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Better yet have the select element with a&amp;nbsp;data-dojo-attach-point="mySelect" in the html code and then you can have simple code like this instead.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mySelect&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'change'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="comment token"&gt;//Now "this" is the widgets scope and you can get to your function.&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now there is no need for the dojo/query or dojo/on modules.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:26:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132737#M3797</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T07:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: this.functionName is not a function at HTMLSelectElement.&lt;anonymous&gt;</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132738#M3798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert&lt;/P&gt;&lt;P&gt;&amp;nbsp;As per your suggestion&amp;nbsp; i changed the code from jquery to dojo.But still drop down change event not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;lt;div &amp;gt;&lt;BR /&gt; &amp;lt;label class="width70" for="SourceCombo" style="margin-top:-20px"&amp;gt;Source Layer:&amp;lt;/label&amp;gt;&lt;BR /&gt; &amp;lt;div data-dojo-attach-point="SourceCombo" data-dojo-type="dijit/form/FilteringSelect" data-dojo-props="searchAttr:'Title',intermediateChanges:true,placeHolder: 'Select Source Layer'" class="dijit-form-FilteringSelect" style="width: 360px;height:30x;margin-Left: 10px;margin-top:-10px"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var layerInfoArray=[];&lt;BR /&gt; var lyrArray=[];&lt;BR /&gt; if (this.map.itemId) {&lt;BR /&gt; LayerInfos.getInstance(this.map, this.map.itemInfo)&lt;BR /&gt; .then(lang.hitch(this, function(operLayerInfos) {&lt;BR /&gt; this.operLayerInfos = operLayerInfos;&lt;BR /&gt; }));&lt;BR /&gt; } &lt;BR /&gt; this.operLayerInfos.traversal(lang.hitch(this, function(layerInfo) {&lt;BR /&gt; layerInfoArray.push(layerInfo);&lt;BR /&gt; }));&lt;BR /&gt; for(var k=1;k&amp;lt;layerInfoArray.length;k++)&lt;BR /&gt; {&lt;BR /&gt; lyrArray.push({"ID":layerInfoArray&lt;K&gt;.id,"Title":layerInfoArray&lt;K&gt;.title});&lt;BR /&gt; }&lt;BR /&gt; var myStore = new Memory({data: lyrArray});&lt;BR /&gt; this.SourceCombo.set('store', myStore);&lt;BR /&gt;this.SourceCombo.on('change', lang.hitch(this, function(){&amp;nbsp; -----&amp;gt;&lt;STRONG&gt;function change event not working and there is no error on console&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; console.log("Hello");-&lt;/STRONG&gt;&lt;BR /&gt;}));&lt;/K&gt;&lt;/K&gt;&lt;/P&gt;&lt;P&gt;All the code is in startup function.please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2019 00:33:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132738#M3798</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2019-02-09T00:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: this.functionName is not a function at HTMLSelectElement.&lt;anonymous&gt;</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132739#M3799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The filteringselect is a strange dijit that does not fire the change event when a dropdown item is selected from the list. Instead use:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SourceCombo&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;watch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'displayedValue'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;property&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; oldValue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; newValue&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Hello"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:26:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/typeerror-this-functionname-is-not-a-function-at/m-p/132739#M3799</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T07:26:02Z</dc:date>
    </item>
  </channel>
</rss>

