cjdickerson

Images and Hyperlinks in InfoWindows from Attribute

Discussion created by cjdickerson on May 9, 2012
Latest reply on May 13, 2012 by rshetye
Hey I'm having some issues in trying to figure out what I need to do to be able to get images and hyperlinks to show up in the following code block.  I want to be able to populate the attribute table of the feature class with the all the paths for the images and with the hyperlinks information and pull that info so it shows in the infowindow.
Please help and thanks.

    function showFeature(feature,evt)
       {
         map.graphics.clear();
           //set symbol for highlighting
              var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.5]));
              feature.setSymbol(symbol);
              var attr = feature.attributes;
              var title = attr.NAME;
              var content = "Address : " + attr.Address
                    + "<br />Abbreviation : " + attr.Abbreviati
                    + "<br />Building Number : " + attr.BUILD_NUM
     + "<br />" + attr.Hyperlink
     + "<br />" + attr.Image_;
              //construct infowindow title and content
              map.graphics.add(feature);
              map.infoWindow.setTitle(title);
              map.infoWindow.setContent(content);
              (evt) ? map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint)) : null;
            }

Outcomes