<?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 Re: Click event listening on a radio button in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414573#M38155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was it, thanks!&amp;nbsp; I had it right in another section of my code, I just went a little too far editing the pizza sample. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Aug 2014 21:21:52 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2014-08-12T21:21:52Z</dc:date>
    <item>
      <title>Click event listening on a radio button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414568#M38150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on a menu that lets the use select a classification method, either quantile or equal interval, as well as letting them change the color or the number of intervals.&amp;nbsp; The number of classes is in a dijit/form/NumberSpinner.&amp;nbsp; The colors I have&amp;nbsp; in a FilteringSelect.&amp;nbsp; For both of those, I was able to have an event listener such as&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14078760260639682 jive_text_macro" jivemacro_uid="_14078760260639682"&gt;
&lt;P&gt;&amp;nbsp; registry.byId('classSelect').on ('change', function (){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; numClass = registry.byId("classSelect").value;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; drawFeatureLayer();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; });&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This lets the user change the interval and it immediately executes the functions that do the drawing.&amp;nbsp; I like the look of a radio buttons and I want to use those for my classification methods.&amp;nbsp; First I tried a dijit/formRadioButton.&amp;nbsp; This looks OK, but selecting between the two choices doesn't have very good styling.&amp;nbsp; The first button still has a little fill color to it, and the 2nd one does too, so it looks like both of them are selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14078762047696764" jivemacro_uid="_14078762047696764"&gt;
&lt;P&gt;&amp;lt;h4&amp;gt;Classification method: &amp;lt;/h4&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form id="classForm"&amp;nbsp; action=""&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="class-method" name="method" id="btnQuantile" value="quantile" data-dojo-type="dijit/form/RadioButton" checked="checked"/&amp;gt; &amp;lt;label for="btnQuantile"&amp;gt;Quantile&amp;lt;/label&amp;gt; &amp;lt;br /&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="class-method" name="method" id="btnEqInterval" value="equal_interval" data-dojo-type="dijit/form/RadioButton" /&amp;gt; &amp;lt;label for="btnEqInterval"&amp;gt;Equal Interval &amp;lt;/label&amp;gt; &amp;lt;br /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other thing I'm not sure about is how I might have an event listener to the change in buttons.&amp;nbsp; All I can figure out is to add a 'Go' button which will read the classification and then execute my drawing function.&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14078763082772061" jivemacro_uid="_14078763082772061"&gt;
&lt;P&gt; registry.byId('btnClassify').on('click', function (){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; var clsForm = dom.byId("classForm");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var i = 0; i &amp;lt; clsForm.method.length; i++) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(clsForm.method&lt;I&gt;.checked){&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentMethod = clsForm.method&lt;I&gt;.value;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;drawFeatureLayer();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; });&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I figured out I don't need a 'Go' button for either the number of classes or my colors, I'd really like to get rid of it all together and not have to have it just for my classification method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose I could use another type of menu, but&amp;nbsp; I only have two methods. It looks klunky to have a dropdown menu that has just one other option in it.&amp;nbsp; Am I missing something obvious on how to detect when one of those two buttons are selected?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 20:49:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414568#M38150</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-08-12T20:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Click event listening on a radio button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414569#M38151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tracy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a sample that shows how to detect when a radio button's value is changed: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://dojotoolkit.org/documentation/tutorials/1.10/checkboxes/demo/onChange.php" title="http://dojotoolkit.org/documentation/tutorials/1.10/checkboxes/demo/onChange.php"&gt;Demo: Dijit CheckBox/RadioButton onChange&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 20:52:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414569#M38151</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2014-08-12T20:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Click event listening on a radio button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414570#M38152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And if you look at the jsfiddle posted in the last response on this stack overflow discussion you'll see one example of the dijit radio buttons could be customized. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/11774875/how-do-i-make-a-customized-radio-button-using-css-and-javascript-or-dojo" title="http://stackoverflow.com/questions/11774875/how-do-i-make-a-customized-radio-button-using-css-and-javascript-or-dojo"&gt;html - How do I make a customized Radio Button using CSS and Javascript or DOJO? - Stack Overflow&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 20:59:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414570#M38152</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2014-08-12T20:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Click event listening on a radio button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414571#M38153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is executing, but its still not styled correctly.&amp;nbsp; The first checked item retains a filled look.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure I have something out of order.&amp;nbsp; What is the true parameter for ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTML&lt;/P&gt;&lt;P&gt;&amp;lt;ul style="list-style-type: none"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input id="btnQuantile" name="quantile" type="radio" value="quantile" checked&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data-dojo-type="dijit/form/RadioButton"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label for="btnQuantile"&amp;gt;Quantile&amp;lt;/label&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/li&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input id="btnEqInterval" name="eqInterval" type="radio" value="equal_interval"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data-dojo-type="dijit/form/RadioButton"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label for="btnEqInterval"&amp;gt;Equal Interval&amp;lt;/label&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/li&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ul&amp;gt;&lt;/P&gt;&lt;P&gt;JAVASCRIPT&lt;/P&gt;&lt;P&gt;registry.byId("btnQuantile").on("click", function(isChecked){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(isChecked){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentMethod="quantile";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drawFeatureLayer();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, true);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; registry.byId("btnEqInterval").on("click", function(isChecked){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(isChecked){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentMethod="equal_interval";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drawFeatureLayer();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, true);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 21:12:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414571#M38153</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-08-12T21:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Click event listening on a radio button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414572#M38154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tracy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The name for both of your input elements needs to be the same in order for the radio buttons to function as a group. Otherwise they are just independent buttons and can both be checked at the same time. In the sample link I sent you'll see that the name value for both options is set to toppings. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 21:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414572#M38154</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2014-08-12T21:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Click event listening on a radio button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414573#M38155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was it, thanks!&amp;nbsp; I had it right in another section of my code, I just went a little too far editing the pizza sample. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 21:21:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-event-listening-on-a-radio-button/m-p/414573#M38155</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-08-12T21:21:52Z</dc:date>
    </item>
  </channel>
</rss>

