<?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: Disable button in custom widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-button-in-custom-widget/m-p/1076712#M73773</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This was exactly what i needed! Only thing that missed was to add the module&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dojo/_base/html&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I found that from one of Your other answers:)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks alot!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Jul 2021 13:32:55 GMT</pubDate>
    <dc:creator>KamranYusaf1</dc:creator>
    <dc:date>2021-07-08T13:32:55Z</dc:date>
    <item>
      <title>Disable button in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-button-in-custom-widget/m-p/1076275#M73760</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am developing my own custom widget for use in WAB. I have this button:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;div&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;data-dojo-attach-event&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"onclick:_onExecute"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;class&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"jimu-btn"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;style&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;text-align:center;&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;Redigér&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;div&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;which i would like to disable at &lt;EM&gt;onOpen .&amp;nbsp;&lt;/EM&gt;I tried giving it id and&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;data-dojo-attach-point but i couldn't manage to disable the button. Can someone point me in the direction of how to achieve this?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;What i am trying to achieve is to disable the button until i have made some checks.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Jul 2021 14:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-button-in-custom-widget/m-p/1076275#M73760</guid>
      <dc:creator>KamranYusaf1</dc:creator>
      <dc:date>2021-07-07T14:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Disable button in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-button-in-custom-widget/m-p/1076279#M73761</link>
      <description>&lt;P&gt;I have a function to enable my buttons that applies a jimu css class&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  _enableBtn(btn, isEnable) {
    if (btn) {
      if (isEnable) {
        html.removeClass(btn, "jimu-state-disabled");
      } else {
        html.addClass(btn, "jimu-state-disabled");
      }
    }
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Here's how I have a button set up in my html file:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div data-dojo-attach-point="btnApplyCoins" id="coinsbtn" class="jimu-btn apply"
     data-dojo-attach-event="onclick:applyEdits" style="margin-top: 10px"&amp;gt;
  ${nls.applyCoins}
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;And here's how I call the enable function&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this._enableBtn(this.btnApplyCoins, isEnable);&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 07 Jul 2021 14:33:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-button-in-custom-widget/m-p/1076279#M73761</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-07-07T14:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Disable button in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-button-in-custom-widget/m-p/1076712#M73773</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This was exactly what i needed! Only thing that missed was to add the module&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;dojo/_base/html&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I found that from one of Your other answers:)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks alot!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Jul 2021 13:32:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-button-in-custom-widget/m-p/1076712#M73773</guid>
      <dc:creator>KamranYusaf1</dc:creator>
      <dc:date>2021-07-08T13:32:55Z</dc:date>
    </item>
  </channel>
</rss>

