amaynard

How to Place info window in sidebar

Discussion created by amaynard on Jun 14, 2013
Latest reply on Jun 18, 2013 by amaynard
Is there a way to place the infowindow in a sidebar using infoWindow.place or some other method, rather than having it open in the map?  I"m using version 3.5, although much of the code is transitional. I cannot implement this sample (http://developers.arcgis.com/en/javascript/jssamples/popup_sidepanel.html) at this time. 


Here is some more background.  I create the infoWindow:

var infoWindow = new esri.dijit.InfoWindow(null, dojo.create("map_infowindow"));
        infoWindow.startup();


Then infowindow is populated when a user clicks a graphic created from results of a query, using a template (not shown)

[HTML]var graphics = map.graphics.graphics;

var intersectedGraphics =[];


        //Create items array to be added to store's data
          var items = []; //all items to be stored in data store

          for (var i=0, il=results.features.length; i<il; i++) {
            
      var featureAttributes = results.features[i].attributes;
       var graphic = results.features[i];
   intersectedGraphics.push(graphic);
      items.push(featureAttributes);
              graphic.setSymbol(symbol);

var template = new esri.InfoTemplate();
//Set the infoWindow to open at the top right of the point at all times

            map.infoWindow.resize(400,350);
        template.setTitle("<b>${ProjID}</b>");
        template.setContent(getWindowContent);
         //template.show(getWindowContent);
    graphic.setInfoTemplate(template);
//Add graphic to the  graphics layer.
              map.graphics.add(graphic);
  //enable graphics to work with mouse events
     map.graphics.enableMouseEvents(graphic);
        map.infoWindow.place(dojo.byId("map_infowindow"), dojo.byId("sidebarinfo"), "first");



    }[/HTML]

Outcomes