<?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: Events in infoWindow. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/events-in-infowindow/m-p/670675#M62576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Never mind, I got it. It looks like the infoWindow gets reused if you click on another point. So it never calls an "onHide" method. Therefore, the "onShow" method doesn't get called again. What it does do is fire an "onRestore" method. I can jack into that and get the result I need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 12:27:42 GMT</pubDate>
    <dc:creator>JimWharton</dc:creator>
    <dc:date>2013-05-21T12:27:42Z</dc:date>
    <item>
      <title>Events in infoWindow.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/events-in-infowindow/m-p/670674#M62575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a link inside of an infoWindow that when clicked, maximizes the window, makes an ajax call and does a setContent on the maximized infoWindow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I connect the event handler like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;connect.connect(map.infoWindow, "onShow", function() { &amp;nbsp;&amp;nbsp;&amp;nbsp; ui.attachDetailsHandler(map); });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My ui module has a method like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;attachDetailsHandler: function(map) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var self = this; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query(".details").on("click", function(e) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Event.stop(e); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var site_id = domAttr.get(this, "id").substring(8); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; details.addDetails(site_id, map); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;If I close the infoWindow and open another, the event connects correctly. The problem comes in when I don't close the infoWindow first. If I just click another graphic on the map, it displays an infoWindow, but the event that should be attached to the link isn't connected. Because of this, the link just reloads the page instead of making my ajax call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why do I need to hit the "X" before opening another infoWindow?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 03:07:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/events-in-infowindow/m-p/670674#M62575</guid>
      <dc:creator>JimWharton</dc:creator>
      <dc:date>2013-05-21T03:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Events in infoWindow.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/events-in-infowindow/m-p/670675#M62576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Never mind, I got it. It looks like the infoWindow gets reused if you click on another point. So it never calls an "onHide" method. Therefore, the "onShow" method doesn't get called again. What it does do is fire an "onRestore" method. I can jack into that and get the result I need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 12:27:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/events-in-infowindow/m-p/670675#M62576</guid>
      <dc:creator>JimWharton</dc:creator>
      <dc:date>2013-05-21T12:27:42Z</dc:date>
    </item>
  </channel>
</rss>

