<?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: Creating a Button to Activate Popup - Issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/creating-a-button-to-activate-popup-issue/m-p/452794#M41868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ian, &lt;/P&gt;&lt;P&gt;Are you trying to create the domNode on the button click or just populate it? I use a button click to populate/remove content from an info widow using a domStyle toggle.&lt;/P&gt;&lt;P&gt;To toggle Off:&lt;/P&gt;&lt;P&gt;domStyle.set(query(".actionList &amp;gt; .action.sForm", window.map.infoWindow.domNode)[0], "display", "none");&lt;/P&gt;&lt;P&gt;To toggle On:&lt;/P&gt;&lt;P&gt;domStyle.set(query(".actionList &amp;gt; .action.sForm", window.map.infoWindow.domNode)[0], "display", "");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't know if that helps any.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Apr 2016 17:04:06 GMT</pubDate>
    <dc:creator>williamcarr</dc:creator>
    <dc:date>2016-04-28T17:04:06Z</dc:date>
    <item>
      <title>Creating a Button to Activate Popup - Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/creating-a-button-to-activate-popup-issue/m-p/452793#M41867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a popup that works well within the application.&amp;nbsp; However, my goal is to tied the popup to a button, where the user must click on the button to activate the popup.&amp;nbsp; I keep getting an error in console mode that states" unexpected identifier and the button does not fire the popup.&amp;nbsp; I have two files, an index.htm and the infoTemplate.js file.&amp;nbsp; Here are snippets of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index.htm&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script src="&lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;js/infoTemplate.js&lt;/STRONG&gt;&lt;/SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!-- Required Application Modules --&amp;gt;&lt;BR /&gt;require([&lt;BR /&gt;&amp;nbsp; "dojo/on",&lt;BR /&gt;&amp;nbsp; "dijit/registry",&lt;BR /&gt;&amp;nbsp; "dojo/dom"&lt;BR /&gt; ], function(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; on,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; registry,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; dom&lt;BR /&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Code Application Function&lt;BR /&gt;&amp;nbsp; on(dom.byId("btnActivatePopup"), "click", activatePopup);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DIV section&lt;/P&gt;&lt;P&gt;&amp;lt;button id="btnActivatePopup"&amp;gt;PopUp&amp;lt;/button&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;infoTemplate.js&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt;&amp;nbsp; "esri/dijit/Popup", &lt;BR /&gt;&amp;nbsp; "esri/dijit/PopupTemplate"&lt;BR /&gt;], function(&lt;BR /&gt;&amp;nbsp; Popup, &lt;BR /&gt;&amp;nbsp; PopupTemplate&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function activatePopup() {&lt;/P&gt;&lt;P&gt;&amp;lt;all of the popup template code in here&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is it that I am missing?&amp;nbsp; Any assistance will be appreciated.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 16:06:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/creating-a-button-to-activate-popup-issue/m-p/452793#M41867</guid>
      <dc:creator>IanPeebles</dc:creator>
      <dc:date>2016-04-28T16:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Button to Activate Popup - Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/creating-a-button-to-activate-popup-issue/m-p/452794#M41868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ian, &lt;/P&gt;&lt;P&gt;Are you trying to create the domNode on the button click or just populate it? I use a button click to populate/remove content from an info widow using a domStyle toggle.&lt;/P&gt;&lt;P&gt;To toggle Off:&lt;/P&gt;&lt;P&gt;domStyle.set(query(".actionList &amp;gt; .action.sForm", window.map.infoWindow.domNode)[0], "display", "none");&lt;/P&gt;&lt;P&gt;To toggle On:&lt;/P&gt;&lt;P&gt;domStyle.set(query(".actionList &amp;gt; .action.sForm", window.map.infoWindow.domNode)[0], "display", "");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't know if that helps any.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 17:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/creating-a-button-to-activate-popup-issue/m-p/452794#M41868</guid>
      <dc:creator>williamcarr</dc:creator>
      <dc:date>2016-04-28T17:04:06Z</dc:date>
    </item>
  </channel>
</rss>

