# Close a Popup window using scripting

**URL:** <https://forum.inductiveautomation.com/t/close-a-popup-window-using-scripting/19411>\
**Category:** Ignition\
**Created:** [August 26, 2018, 12:27pm UTC](https://forum.inductiveautomation.com/t/close-a-popup-window-using-scripting/19411 "2018-08-26T12:27:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [August 26, 2018, 12:27pm UTC](https://forum.inductiveautomation.com/t/close-a-popup-window-using-scripting/19411/1 "2018-08-26T12:27:59Z")

</div>

How would you go about using scripting to close a popup window.  
I have tried this but with no luck. Any Ideas.  
system.nav.closeWindow(‘MaintWorkOrder’)

---

<div class="post-metadata">

**Author:** ![SillyBear](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sillybear/32/9290_2.png) [@SillyBear](https://forum.inductiveautomation.com/u/SillyBear)\
**Post date:** [August 26, 2018, 5:11pm UTC](https://forum.inductiveautomation.com/t/close-a-popup-window-using-scripting/19411/2 "2018-08-26T17:11:36Z")

</div>

It could be that you have the wrong window path, so I would try iterating through all of the window names using system.gui.getWindowNames() to see if you have the right one.

Or that the event script isn’t firing for some reason.

---

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [August 26, 2018, 9:39pm UTC](https://forum.inductiveautomation.com/t/close-a-popup-window-using-scripting/19411/3 "2018-08-26T21:39:27Z")

</div>

I had the window path wrong. I just had the subfolder listed
