# How to get the ids of all open popups? (to close them all)

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-the-ids-of-all-open-popups-to-close-them-all/107617>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 20, 2025, 11:50am UTC](https://forum.inductiveautomation.com/t/how-to-get-the-ids-of-all-open-popups-to-close-them-all/107617 "2025-06-20T11:50:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [June 20, 2025, 2:23pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-ids-of-all-open-popups-to-close-them-all/107617/3 "2025-06-20T14:23:45Z")

</div>

I did find a relevant post I stumbled on in the past (hint: use a message handler).

> [@How to close popup when screen changes?](https://forum.inductiveautomation.com/t/how-to-close-popup-when-screen-changes/68690/8):
>
> In addition to the quick-and-dirty avenue I already supplied, there's two other ways to do this. More correct: In the onShutdown Event script for the View in question, close out all "known" Popups for the View. known\_popup\_ids = ["a", "b", "c"] for popup\_id in known\_popup\_ids: system.perspective.closePopup(id=popup\_id) This requires you to always update the list of potential Popups, so this is inherently brittle as you develop and add more content. Additionally, there is always the possi…

Scroll up a few posts to find a version of your 'dodgy solution' 😄

The above aside, I do wish there was a built-in to retrieve information about all open popups (and their z-order) of a session.

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-get-the-ids-of-all-open-popups-to-close-them-all/107617)._
