<?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 Programmatically Manipulate dijit.form.FilteringSelect in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-manipulate-dijit-form/m-p/625818#M58397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OnLoad I programmatically create two (2) combined FilteringSelect menus:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first filters the seceond.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
new dijit.form.FilteringSelect({store: new dojo.data.ItemFileReadStore({data: claimsYearJson}),
autoComplete: true,
style: "width: 95px;",
id: "yearOf",
onChange: function(yearOf){dijit.byId('stormName').query.yearOf = yearOf;}}, "yearOf");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
new dijit.form.FilteringSelect({store: new dojo.data.ItemFileReadStore({data: claimsStormNameJson}),
autoComplete: true,
query: {yearOf: "*"},
style: "width: 155px;",
id: "stormName"
}, "stormName");
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works great as a means to set my Feature Layer selection On Demand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, another component of my application programmatically changes the "displayedValue" of the menus upon user click, which works as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What doesn't work is that when the 'displayedValue' is changed progammatically the second menu displays an erroneous message saying, "The Value Entered Is Not Valid."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe this is because while the 'displayedValue' values have been changed the filtering query of the first is not fired off (onChange) because this is done programmatically and hence it sees a new value in the menu that does not match the most recent manual onChange query results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know how to programmatically fire off the onChange event?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Sep 2010 19:44:09 GMT</pubDate>
    <dc:creator>KeithSandell</dc:creator>
    <dc:date>2010-09-24T19:44:09Z</dc:date>
    <item>
      <title>Programmatically Manipulate dijit.form.FilteringSelect</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-manipulate-dijit-form/m-p/625818#M58397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OnLoad I programmatically create two (2) combined FilteringSelect menus:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first filters the seceond.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
new dijit.form.FilteringSelect({store: new dojo.data.ItemFileReadStore({data: claimsYearJson}),
autoComplete: true,
style: "width: 95px;",
id: "yearOf",
onChange: function(yearOf){dijit.byId('stormName').query.yearOf = yearOf;}}, "yearOf");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
new dijit.form.FilteringSelect({store: new dojo.data.ItemFileReadStore({data: claimsStormNameJson}),
autoComplete: true,
query: {yearOf: "*"},
style: "width: 155px;",
id: "stormName"
}, "stormName");
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works great as a means to set my Feature Layer selection On Demand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, another component of my application programmatically changes the "displayedValue" of the menus upon user click, which works as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What doesn't work is that when the 'displayedValue' is changed progammatically the second menu displays an erroneous message saying, "The Value Entered Is Not Valid."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe this is because while the 'displayedValue' values have been changed the filtering query of the first is not fired off (onChange) because this is done programmatically and hence it sees a new value in the menu that does not match the most recent manual onChange query results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know how to programmatically fire off the onChange event?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 19:44:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-manipulate-dijit-form/m-p/625818#M58397</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2010-09-24T19:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Manipulate dijit.form.FilteringSelect - Resolved</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-manipulate-dijit-form/m-p/625819#M58398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I did some Googling for a solution and found that to programmatically fire off the onchange() event all I needed to do was get the DOM element and do, " .onchnage();"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, for some reason while that did not cause any errors it also did not fire off the code that is natively part of the onchange function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I implanted a copy of the query from the element into the function that causes the values to programmatically change and presto...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No more error!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 16:01:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/programmatically-manipulate-dijit-form/m-p/625819#M58398</guid>
      <dc:creator>KeithSandell</dc:creator>
      <dc:date>2010-09-27T16:01:15Z</dc:date>
    </item>
  </channel>
</rss>

