AnsweredAssumed Answered

Close Dialog Popup on Hyperlink Click

Question asked by deleted-user-1_r2dgYuILKY on Aug 10, 2017
Latest reply on Jan 4, 2018 by rscheitlin

I have a dialog popup with a hyperlink. I want the popup to close when the link is clicked. I've tried "nboLink.on("click", closeDialog);" but the console says that this is not a function. Here is my code: 


Layer.on("click", function(evt){
            var name = evt.graphic.attributes.NAME;
            var nameNoDot = name.replace(/\./g,"");
            var nameDash = nameNoDot.replace(/_/g, "-");
            var nameLower = nameDash.toLowerCase();
          var nboLink = "<b>${NAME}</b><hr><a target='_blank' href='http://website/profiles/" + nameLower +
          var popupContent = esriLang.substitute(evt.graphic.attributes,nboLink);

          domStyle.set(dialog.domNode, "opacity", 0.70);
            popup: dialog,
            x: evt.pageX,
            y: evt.pageY,
          function closeDialog(){