<?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 Custom Popup container or how do I put content elsewhere? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655542#M61139</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working with JSAPI 4.7&lt;/P&gt;&lt;P&gt;I really like Popup Templates for what they do out of the box - attribute substitution/functions/promises/actions.&amp;nbsp; However, I would really like to place my popup contents somewhere else on my page (not on map).&amp;nbsp; Like I do with LayerList and Legend widgets.&amp;nbsp; However, when I set the container property for my popups, instead of putting my contents in it, it removes that element from it's parent node, and still floats it over the map.&amp;nbsp; Not what I was expecting.&lt;/P&gt;&lt;P&gt;&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;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; view &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;MapView&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 container&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"viewDiv"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// Reference to the DOM node that will contain the view&lt;/SPAN&gt;
 map&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// References the map object created in step 3&lt;/SPAN&gt;
 center&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;90&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;50&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 zoom&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 popup&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"queryResults"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;And later in my view.on click event&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;popup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;open&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Results"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 content&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"This is some content"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;So my question is - am I doing this wrong? I am assuming this behaviour is as designed, and I'm asking too much. However, I'd like to be pleasantly surprised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, is there a way to obtain the rendered content without the popup popping up, so I can insert it in the DOM myself? I'm hoping to use the popup templates for identify query task results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:45:57 GMT</pubDate>
    <dc:creator>LizEidsness</dc:creator>
    <dc:date>2021-12-12T03:45:57Z</dc:date>
    <item>
      <title>Custom Popup container or how do I put content elsewhere?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655542#M61139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working with JSAPI 4.7&lt;/P&gt;&lt;P&gt;I really like Popup Templates for what they do out of the box - attribute substitution/functions/promises/actions.&amp;nbsp; However, I would really like to place my popup contents somewhere else on my page (not on map).&amp;nbsp; Like I do with LayerList and Legend widgets.&amp;nbsp; However, when I set the container property for my popups, instead of putting my contents in it, it removes that element from it's parent node, and still floats it over the map.&amp;nbsp; Not what I was expecting.&lt;/P&gt;&lt;P&gt;&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;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; view &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;MapView&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 container&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"viewDiv"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// Reference to the DOM node that will contain the view&lt;/SPAN&gt;
 map&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// References the map object created in step 3&lt;/SPAN&gt;
 center&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;90&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;50&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 zoom&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 popup&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"queryResults"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;And later in my view.on click event&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;popup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;open&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Results"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 content&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"This is some content"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;So my question is - am I doing this wrong? I am assuming this behaviour is as designed, and I'm asking too much. However, I'd like to be pleasantly surprised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, is there a way to obtain the rendered content without the popup popping up, so I can insert it in the DOM myself? I'm hoping to use the popup templates for identify query task results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:45:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655542#M61139</guid>
      <dc:creator>LizEidsness</dc:creator>
      <dc:date>2021-12-12T03:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Popup container or how do I put content elsewhere?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655543#M61140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Liz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One option might be to use the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature.html"&gt;Feature&lt;/A&gt; widget to display the popup content. You'd need to build in support for multiple features and displaying the title but it does allow you to display the popup content in another container. Here's a sample app:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://jsbin.com/wirucif/edit?html,output" title="http://jsbin.com/wirucif/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 17:02:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655543#M61140</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2018-05-24T17:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Popup container or how do I put content elsewhere?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655544#M61141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This widget presents the same problem I am having.&amp;nbsp; If I put the DIV target outside of the view (say add a block beneath the map), it's taken by the widget (removed from the DOM) and placed in the view.&amp;nbsp; I think I am missing a step somewhere else.&amp;nbsp; I was given some esri support using Popup and it works.&amp;nbsp; But I don't know why.&amp;nbsp; Yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 18:15:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655544#M61141</guid>
      <dc:creator>LizEidsness</dc:creator>
      <dc:date>2018-05-24T18:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Popup container or how do I put content elsewhere?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655545#M61142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see the issue with the div being&amp;nbsp;placed&amp;nbsp;in the view.&amp;nbsp; Did you disable the popup for the layer so the default behavior doesn't occur? Here's a test case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://jsbin.com/taruzik/edit?html,output" title="http://jsbin.com/taruzik/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 18:23:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655545#M61142</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2018-05-24T18:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Popup container or how do I put content elsewhere?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655546#M61143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your second case works for me.&amp;nbsp; The problem I was originally having, and also with your first example, is the popup/feature was attached to the view.&amp;nbsp; I wasn't realizing it could be "opened" on it's own merits.&amp;nbsp; I think when it's attached to the view, the view takes it over and moves it.&amp;nbsp; The ESRI support example I have used a popup, but also on it's own, so that's why it worked.&amp;nbsp; I like your Feature example though because it has less Popup-y formatting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh and thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 18:33:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-popup-container-or-how-do-i-put-content/m-p/655546#M61143</guid>
      <dc:creator>LizEidsness</dc:creator>
      <dc:date>2018-05-24T18:33:23Z</dc:date>
    </item>
  </channel>
</rss>

