<?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 need help with ArcGIS API Javascript sidebar in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616932#M57661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is an assignment but I am really stuck and when I can work on the assignment my professor is asleep so I can't get help until the next day (tough when the assignment is due in 2 days and you are only 1/3rd done).&amp;nbsp; Anyway, I created a map with 3 layers.&amp;nbsp; One is a basemap and 2 show election information for two different candidates.&amp;nbsp; I got that part of the map to work but I am having trouble incorporating a clickable sidebar.&amp;nbsp; Right now I get no map with the sidebar titles at the top left of the page. I attached my code.&amp;nbsp; Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2012 02:13:35 GMT</pubDate>
    <dc:creator>LisaD</dc:creator>
    <dc:date>2012-06-05T02:13:35Z</dc:date>
    <item>
      <title>need help with ArcGIS API Javascript sidebar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616932#M57661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is an assignment but I am really stuck and when I can work on the assignment my professor is asleep so I can't get help until the next day (tough when the assignment is due in 2 days and you are only 1/3rd done).&amp;nbsp; Anyway, I created a map with 3 layers.&amp;nbsp; One is a basemap and 2 show election information for two different candidates.&amp;nbsp; I got that part of the map to work but I am having trouble incorporating a clickable sidebar.&amp;nbsp; Right now I get no map with the sidebar titles at the top left of the page. I attached my code.&amp;nbsp; Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 02:13:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616932#M57661</guid>
      <dc:creator>LisaD</dc:creator>
      <dc:date>2012-06-05T02:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: need help with ArcGIS API Javascript sidebar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616933#M57662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can't get this to work at all on my machine, are you sure it works on yours? A couple changes I made that are necessary&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;1. The call to the &amp;lt;script type="text/javascript" src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8" rel="nofollow" target="_blank"&gt;http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.8&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt; needs to come before the vvar djconfig { parseOnLoad: true };&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. In the init call implements a definition query qryStates that I don't see anywhere.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. In the function initOperationalLayer() your first renderer is set on featureLayer, when I think it should be on states&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try those and see what happens, but I still think you need a lot of work&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 13:01:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616933#M57662</guid>
      <dc:creator>BenStewart</dc:creator>
      <dc:date>2012-06-05T13:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: need help with ArcGIS API Javascript sidebar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616934#M57663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was able to get a little further last night.&amp;nbsp; However, I still have lines of code that make my map vanish (commented out of my code right now) and the table in my sidebar is not showing up.&amp;nbsp; What I would like is for a third layer that has all those states to be used for the sidebar.&amp;nbsp; Right now when you click a state an info window comes up based on that particular candidate layer.&amp;nbsp; I want it to pull from one layer.&amp;nbsp; I am not sure how right now.&amp;nbsp; I will check out your suggestions as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.personal.psu.edu/lud143/lesson5e.html"&gt;http://www.personal.psu.edu/lud143/lesson5e.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 13:19:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616934#M57663</guid>
      <dc:creator>LisaD</dc:creator>
      <dc:date>2012-06-05T13:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: need help with ArcGIS API Javascript sidebar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616935#M57664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To start, what are you using to debug your javascript? Regardless of what it is, I would suggest using firebug for firefox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I see two problems with the section with the line you comment as //map vanishes... First, you are registering a function to execute on featureLayer's onLoad event, but featureLayer is not defined, should that be states? What is the purpose of that event? Second, in the query definition for that connection, the qrystates is not defined.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I have attached a piece of code below from a website of mine, sorry I can't give you a live version. It defines a data table and the events for it, the populates that table as well&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//This function creates the Data table at the bottom of the page storing all the projects
 function createDataTable(){
&amp;nbsp; var data = { identifier: 'id', items: [] };
&amp;nbsp; 
&amp;nbsp; //Create the store object to populate the table
&amp;nbsp; var rows=nProj;
&amp;nbsp; for (var i=0; i &amp;lt; rows; i++){ data.items.push(dojo.mixin({ id:i+1 }, projectTable&lt;I&gt;)); }
&amp;nbsp; var store = new dojo.data.ItemFileWriteStore({data:data});
&amp;nbsp; 
&amp;nbsp; //Define layout
&amp;nbsp; var layout = [[
&amp;nbsp;&amp;nbsp; {'name':'Project ID','field':'projID', 'width':'100px'},
&amp;nbsp;&amp;nbsp; {'name':'Title','field':'Title', 'width':'500px'},
&amp;nbsp;&amp;nbsp; {'name':'Provider','field':'Provider', 'width':'100px'},
&amp;nbsp;&amp;nbsp; {'name':'Seeker','field':'Seeker', 'width':'100px'},
&amp;nbsp;&amp;nbsp; {'name':'Topic','field':'Topic', 'width':'200px'},
&amp;nbsp;&amp;nbsp; {'name':'Sub Topic','field':'SubTopic', 'width':'300px'},
&amp;nbsp; ]];
&amp;nbsp; 
&amp;nbsp; var grid = new dojox.grid.DataGrid({
&amp;nbsp;&amp;nbsp; id:'grid',
&amp;nbsp;&amp;nbsp; store:store,
&amp;nbsp;&amp;nbsp; structure:layout,
&amp;nbsp;&amp;nbsp; rowSelector:'20px'}, 
&amp;nbsp;&amp;nbsp; document.createElement('div')
&amp;nbsp; );
&amp;nbsp; 
&amp;nbsp; dojo.byId("projectInformation").appendChild(grid.domNode);
&amp;nbsp; grid.startup();
&amp;nbsp; 
&amp;nbsp; //Event handlers below are used to visualize projects. A single click maps a single connection, a double click maps and entire project
&amp;nbsp; dojo.connect(grid, "onRowClick", grid, function(evt){
&amp;nbsp;&amp;nbsp; var idx = evt.rowIndex,
&amp;nbsp;&amp;nbsp; item = this.getItem(idx);
&amp;nbsp;&amp;nbsp; var defn = "Provider='" + item.Provider + "' AND Seeker='" + item.Seeker + "' AND ProjectID='" + item.projID + "'";
&amp;nbsp;&amp;nbsp; mapLines(defn);
&amp;nbsp; }); 
&amp;nbsp; 
&amp;nbsp; dojo.connect(grid, "onRowDblClick", grid, function(evt){
&amp;nbsp;&amp;nbsp; var idx = evt.rowIndex,
&amp;nbsp;&amp;nbsp; item = this.getItem(idx);
&amp;nbsp;&amp;nbsp; var defn = "ProjectID='" + item.projID + "'";
&amp;nbsp;&amp;nbsp; mapLines(defn);
&amp;nbsp; }); 
 }
&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:22:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616935#M57664</guid>
      <dc:creator>BenStewart</dc:creator>
      <dc:date>2021-12-12T02:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: need help with ArcGIS API Javascript sidebar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616936#M57665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attempting to use states as that third layer so the grid is not pulling data from the candidate layers.&amp;nbsp; I want it to pull from the 3rd layer for the sidebar and infoWindow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 15:02:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616936#M57665</guid>
      <dc:creator>LisaD</dc:creator>
      <dc:date>2012-06-05T15:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: need help with ArcGIS API Javascript sidebar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616937#M57666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One last thing - everything works now except the "clickable" sidebar.&amp;nbsp; The assignment calls for either getting an info window when you click the map or when you click the name in the sidebar.&amp;nbsp; I already have the clicking the map right but the over-achiever in me would like to get the sidebar to work.&amp;nbsp; My code is at the same page indicated above.&amp;nbsp; I know this has to do with the query and defining the query but I don't understand exactly what the query does so I can't work it out.&amp;nbsp; Any help would be appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 02:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616937#M57666</guid>
      <dc:creator>LisaD</dc:creator>
      <dc:date>2012-06-06T02:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: need help with ArcGIS API Javascript sidebar</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616938#M57667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The onRowClickHandler is firing, just not doing anything. You get the objectiID in the first line, but after that I am a bit confused about what you are doing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would try to use that OBJECTID to make a selection query, then select the features you want using a query feature. You could then set up a dojo handler to handle selection complete on the layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; var query = new esri.tasks.Query();
&amp;nbsp; query.where= "OBJECTID = " + clickedStatesID 
&amp;nbsp; featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:22:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-with-arcgis-api-javascript-sidebar/m-p/616938#M57667</guid>
      <dc:creator>BenStewart</dc:creator>
      <dc:date>2021-12-12T02:22:20Z</dc:date>
    </item>
  </channel>
</rss>

