Showing attachments in Popups

Discussion created by steven_3535 on Sep 6, 2013
Latest reply on Dec 5, 2013 by ganeshssac
Hello there, I have been trying to get my attachments to load into a pop up window but it just won't work.  I have a web application with a link to an edit application where you can see the attachment.  Setting the attachment works fine, but it doesn't show up in the popup on the web application.

Here is the code (where I think I am supposed to be editing).  I'm fairly new to coding and was asked to look into this.

[HTML]var deferred = identifyTask.execute(identifyParams);

        deferred.addCallback(function(response) {   
          // response is an array of identify result objects    
          // Let's return an array of features.
          return, function(result) {
            var feature = result.feature;
            feature.attributes.layerName = result.layerName;
            if(result.layerName == 'Building Interior Space - Floor 1'){
     //alert("did we make it?");
             var template = new esri.InfoTemplate("", "Building Name: ${Building Name} <br/> Floor Number: ${Floor Number} <br/> Space Name: ${Short Name of Space} <br/> Full Space Name: ${Full Name of Space} <br/> Space Type: ${Space Type} <br/> Staff Name: ${STAFFNM} <br/> Phone: ${PHONE} <br/> Access Type: ${Access Type} <br/>");
   return feature;
   map.infoWindow.setFeatures([ deferred ]);;


I've been searching all over and found several threads dealing with it but I can't get their fixes to work.

Any help would be greatly appreciated, Thanks!