<?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 Print Export button when Exporting Map - ArcGIS API for JS 4.16 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346328#M31992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent! Good work Paul, and thank you for sharing&amp;nbsp;your solution with the community.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Oct 2020 15:33:23 GMT</pubDate>
    <dc:creator>Noah-Sager</dc:creator>
    <dc:date>2020-10-13T15:33:23Z</dc:date>
    <item>
      <title>Disable Print Export button when Exporting Map - ArcGIS API for JS 4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346323#M31987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to disable the print export button when the user is in the process of exporting their map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Export button from Print widget" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/509401_exportBtn2.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, a user is able to repeatedly generate map exports while an export is taking place. Is there a way to disable the button until the export has completed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2020 19:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346323#M31987</guid>
      <dc:creator>PaulMcCord</dc:creator>
      <dc:date>2020-10-07T19:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Print Export button when Exporting Map - ArcGIS API for JS 4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346324#M31988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting question. Is the use case that the end user does not realize a print job is currently running, or are they getting bored waiting and click the button again to increase the speed, or are people just repeatedly clicking on the print button?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you would need to customize the print widget in order to disable the print button, there might be another way soon (e.g. this week). At 4.17, we are introducing submit and complete events to the print widget, so you could do something like if the widget is in submit mode, then disable the print function with the PrintViewModel.print() method. Here is the info about the enhancements on next:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/feedback-js-api-next/blob/master/CHANGELOG.md#print" title="https://github.com/Esri/feedback-js-api-next/blob/master/CHANGELOG.md#print"&gt;feedback-js-api-next/CHANGELOG.md at master · Esri/feedback-js-api-next · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2020 01:47:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346324#M31988</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-10-08T01:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Print Export button when Exporting Map - ArcGIS API for JS 4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346325#M31989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The use case is primarily that people seem to be just clicking the button repeatedly, which might be due to them not knowing that the print job is currently running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was playing around with a couple ways to disable the print widget, but felt I was making very little progress which is why I posted my question. I'm interested in the potential solution with 4.17. I'll check that out when it's released and post my solution if it ends up solving it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2020 17:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346325#M31989</guid>
      <dc:creator>PaulMcCord</dc:creator>
      <dc:date>2020-10-08T17:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Print Export button when Exporting Map - ArcGIS API for JS 4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346326#M31990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any luck &lt;A href="https://community.esri.com/migrated-users/289270"&gt;Paul McCord&lt;/A&gt;‌? Here is the Print widget mention in the release notes:&lt;BR /&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/guide/release-notes/index.html#print" title="https://developers.arcgis.com/javascript/latest/guide/release-notes/index.html#print"&gt;Print widget - Release notes for 4.17&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2020 17:06:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346326#M31990</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-10-12T17:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Print Export button when Exporting Map - ArcGIS API for JS 4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346327#M31991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Noah, The 'submit' and 'complete' events in the 4.17 release made this much more manageable. I've got it working now so that when the Export button is clicked, the button is disabled until the print job finishes. Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;Print&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;view&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;myView&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;printServiceUrl&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;***&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe; "&gt;removed by author***&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;container&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;printContainer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;on&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"submit"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;".esri-print__export-button"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;).&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;attr&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"disabled"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;on&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"complete"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;".esri-print__export-button"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;).&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;attr&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"disabled"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #d4d4d4;"&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2020 14:35:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346327#M31991</guid>
      <dc:creator>PaulMcCord</dc:creator>
      <dc:date>2020-10-13T14:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Print Export button when Exporting Map - ArcGIS API for JS 4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346328#M31992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent! Good work Paul, and thank you for sharing&amp;nbsp;your solution with the community.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2020 15:33:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/346328#M31992</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-10-13T15:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Disable Print Export button when Exporting Map - ArcGIS API for JS 4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/1245406#M79774</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/55443" target="_self"&gt;PaulMcCord,&lt;/A&gt; maybe you can help. I tried to use your code, but all I get is an error -&amp;nbsp; Uncaught ReferenceError: $ is not defined. ver. js - 4.25.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const printMap = new Print({
    view: view,
    printServiceUrl:
"...",
    allowedLayouts: ["map-only", "a3-landscape", "a3-portrait", "a4-landscape", "a4-portrait"],
    allowedFormats: ["pdf", "jpg", "eps", "png32"]
});

printMap.on("submit", function(){
    $(".esri-print__export-button").attr("disabled", true);
})

printMap.on("complete", function(){
    $(".esri-print__export-button").attr("disabled", false);
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;My js level is beginner. Do you have any ideas? Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 19:34:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/disable-print-export-button-when-exporting-map/m-p/1245406#M79774</guid>
      <dc:creator>KirillLiss</dc:creator>
      <dc:date>2023-01-04T19:34:32Z</dc:date>
    </item>
  </channel>
</rss>

