<?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 Placeholders in tabbed infoWindow in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/placeholders-in-tabbed-infowindow/m-p/678595#M63266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been working lately to get tabs working in my infoWindows.&amp;nbsp; I have the tabs working, but now the placeholders that I'm putting in are no longer working.&amp;nbsp; Before I started the tabs I had regular infoWindows and the same placeholders worked fine.&amp;nbsp; Is there something to do with tabs that requires me to do this in a different way?&amp;nbsp; Here's a snippet of my code that sets up the tabs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function getInfoWindowContent() {

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a tab container 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var tc = new dijit.layout.TabContainer({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style: "height: 100%; width: 100%;"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, dojo.create("div"));

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create first tab
&amp;nbsp;&amp;nbsp;&amp;nbsp; var cp1 = new dijit.layout.ContentPane({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title: "Details",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content: "Name: ${NAME}"
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; tc.addChild(cp1); // Add tab to container

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create second tab
&amp;nbsp;&amp;nbsp;&amp;nbsp; var cp2 = new dijit.layout.ContentPane({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title: "Details 2",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content: "Content for Tab2"
&amp;nbsp;&amp;nbsp;&amp;nbsp; });

&amp;nbsp;&amp;nbsp;&amp;nbsp; tc.addChild(cp2); // Add tab to container

&amp;nbsp;&amp;nbsp;&amp;nbsp; return tc.domNode;
}

function addPoints() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp;&amp;nbsp; var infoTemplate = new esri.InfoTemplate;
&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate.setTitle("City Information");
&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate.setContent(getInfoWindowContent);

&amp;nbsp;&amp;nbsp;&amp;nbsp; symbol = new esri.symbol.SimpleMarkerSymbol().setStyle(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE).setSize(9).setColor(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new dojo.Color( [ 255, 255, 255]));

&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setSymbol(symbol).setInfoTemplate(infoTemplate);
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsExtent.push(feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
}

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Apr 2011 16:25:14 GMT</pubDate>
    <dc:creator>JasonMiller1</dc:creator>
    <dc:date>2011-04-15T16:25:14Z</dc:date>
    <item>
      <title>Placeholders in tabbed infoWindow</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/placeholders-in-tabbed-infowindow/m-p/678595#M63266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been working lately to get tabs working in my infoWindows.&amp;nbsp; I have the tabs working, but now the placeholders that I'm putting in are no longer working.&amp;nbsp; Before I started the tabs I had regular infoWindows and the same placeholders worked fine.&amp;nbsp; Is there something to do with tabs that requires me to do this in a different way?&amp;nbsp; Here's a snippet of my code that sets up the tabs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function getInfoWindowContent() {

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a tab container 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var tc = new dijit.layout.TabContainer({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style: "height: 100%; width: 100%;"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, dojo.create("div"));

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create first tab
&amp;nbsp;&amp;nbsp;&amp;nbsp; var cp1 = new dijit.layout.ContentPane({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title: "Details",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content: "Name: ${NAME}"
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; tc.addChild(cp1); // Add tab to container

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create second tab
&amp;nbsp;&amp;nbsp;&amp;nbsp; var cp2 = new dijit.layout.ContentPane({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title: "Details 2",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content: "Content for Tab2"
&amp;nbsp;&amp;nbsp;&amp;nbsp; });

&amp;nbsp;&amp;nbsp;&amp;nbsp; tc.addChild(cp2); // Add tab to container

&amp;nbsp;&amp;nbsp;&amp;nbsp; return tc.domNode;
}

function addPoints() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp;&amp;nbsp; var infoTemplate = new esri.InfoTemplate;
&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate.setTitle("City Information");
&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate.setContent(getInfoWindowContent);

&amp;nbsp;&amp;nbsp;&amp;nbsp; symbol = new esri.symbol.SimpleMarkerSymbol().setStyle(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE).setSize(9).setColor(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new dojo.Color( [ 255, 255, 255]));

&amp;nbsp;&amp;nbsp;&amp;nbsp; feature.setSymbol(symbol).setInfoTemplate(infoTemplate);
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsExtent.push(feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
}

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 16:25:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/placeholders-in-tabbed-infowindow/m-p/678595#M63266</guid>
      <dc:creator>JasonMiller1</dc:creator>
      <dc:date>2011-04-15T16:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Placeholders in tabbed infoWindow</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/placeholders-in-tabbed-infowindow/m-p/678596#M63267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When you specify a function to define the content for your info window, like you've done with getWindowContent, you do not have access to the placeholders. Instead you get the attributes from the graphic. In this snippet we define that the info window's content will be generated using a function named 'getWindowContent'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;template.setContent(getWindowContent);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once you set this up, each time you click on a feature in the feature layer the getWindowContent function runs and provides you access to the clicked feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt; function getWindowContent(graphic) {&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then in the code you can access the feature's attributes as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;graphic.attributes.NAME&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So in your code you'll want to replace the placeholder {NAME} with graphic.attributes.NAME.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 18:39:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/placeholders-in-tabbed-infowindow/m-p/678596#M63267</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2011-04-15T18:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Placeholders in tabbed infoWindow</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/placeholders-in-tabbed-infowindow/m-p/678597#M63268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That works like a champ!&amp;nbsp; Thanks for the help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 18:47:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/placeholders-in-tabbed-infowindow/m-p/678597#M63268</guid>
      <dc:creator>JasonMiller1</dc:creator>
      <dc:date>2011-04-15T18:47:24Z</dc:date>
    </item>
  </channel>
</rss>

