<?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: is it possible to disconnect an onClick event listener? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653140#M60863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please read the Concepts part of the ArcGIS Server JS-API documentation: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_events.htm"&gt;Working with events&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Nov 2010 10:27:09 GMT</pubDate>
    <dc:creator>AxelSchaefer</dc:creator>
    <dc:date>2010-11-10T10:27:09Z</dc:date>
    <item>
      <title>is it possible to disconnect an onClick event listener?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653138#M60861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;basically i want to enable and disable the onClick listener at will.&amp;nbsp; is this possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i see where you can do a dojo.disconnect(map, "onClick"); on unload but I want to be able to turn it on and off via a function.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if this isn't possible are there any other creative solutions to this problem?&amp;nbsp; i can achieve the desired effect I am after by just hiding the div that is getting the results from my onclick event, but this seems like a waste of resources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 12:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653138#M60861</guid>
      <dc:creator>BradCochran</dc:creator>
      <dc:date>2010-11-09T12:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to disconnect an onClick event listener?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653139#M60862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;dojo.connect returns a handle that you can use to disconnect the event listener. Use something like this in your code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var map_click_handle = dojo.connect(map, 'onClick' some_function);
dojo.disconnect(map_click_handle);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course that's a simplified example... Check out the &lt;/SPAN&gt;&lt;A href="http://docs.dojocampus.org/dojo/connect" rel="nofollow noopener noreferrer" target="_blank"&gt;docs for dojo.connect&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="http://docs.dojocampus.org/dojo/disconnect" rel="nofollow noopener noreferrer" target="_blank"&gt;dojo.disconnect&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:41:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653139#M60862</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-12T03:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to disconnect an onClick event listener?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653140#M60863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please read the Concepts part of the ArcGIS Server JS-API documentation: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_events.htm"&gt;Working with events&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 10:27:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653140#M60863</guid>
      <dc:creator>AxelSchaefer</dc:creator>
      <dc:date>2010-11-10T10:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to disconnect an onClick event listener?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653141#M60864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;awesome thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 13:59:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-disconnect-an-onclick-event/m-p/653141#M60864</guid>
      <dc:creator>BradCochran</dc:creator>
      <dc:date>2010-11-10T13:59:55Z</dc:date>
    </item>
  </channel>
</rss>

