Select to view content in your preferred language

Call function from Popup window

6731
11
Jump to solution
12-08-2015 12:18 PM
RyanSellman
Occasional Contributor II

Hello All,

Does anyone have an example of how to call a function from inside a popup window?  I've been digging around the forums and haven't had much luck in finding a sample of what I am trying implement.  Right now, I have a Popup Template set up that shows basic attributes for the selected feature and also provides links to various resources regarding that selected feature.  See the image attached.

Below the Recorded Documents link, I'd like to add an "Open Old Tax Map Image" link that calls a function instead of opening a link.  I have tried a handful of things including using code from this sample ​but I can't get anything to do exactly what I have described.  Does anyone have an idea as to how I can accomplish this?

Any help is appreciated!

Thanks,

Ryan

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus

Ryan,

  Sure with the check layer event was being called by the popup selection-change event and when the selection was cleared by click a new spot on the map the event fires as the selection becomes null for a untill a new feature is found or not. Thus the need to check if the feat var exists before we check if it has a _layer property.

RyanSellman
Occasional Contributor II

Robert,

Makes good sense.  Thank you for the explanation!

Ryan

0 Kudos