# Open a popup window with Tag using client events

**URL:** <https://forum.inductiveautomation.com/t/open-a-popup-window-with-tag-using-client-events/73291>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [May 4, 2023, 9:23pm UTC](https://forum.inductiveautomation.com/t/open-a-popup-window-with-tag-using-client-events/73291 "2023-05-04T21:23:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopher\_hurst](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@christopher\_hurst](https://forum.inductiveautomation.com/u/christopher_hurst)\
**Post date:** [May 4, 2023, 9:23pm UTC](https://forum.inductiveautomation.com/t/open-a-popup-window-with-tag-using-client-events/73291/1 "2023-05-04T21:23:34Z")

</div>

Im trying to open a Pop up window when my tag is True=(1) and close it when it false=(0). Im using a client events tag change script. Any ideas

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/e/ce245a0f424491bed55324c7f0b9c6c4ed7ce6a0.png)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 4, 2023, 11:56pm UTC](https://forum.inductiveautomation.com/t/open-a-popup-window-with-tag-using-client-events/73291/2 "2023-05-04T23:56:51Z")

</div>

If it's a Boolean tag, the tag change event script should look like this:

```auto
if event.getCurrentValue().value:
	system.nav.openWindowInstance("User Management/Effluent Select")

```

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 5, 2023, 12:31am UTC](https://forum.inductiveautomation.com/t/open-a-popup-window-with-tag-using-client-events/73291/3 "2023-05-05T00:31:37Z")

</div>

> [@christopher\_hurst](#):
>
> and close it when it false=(0)

Oops. I forgot to address that part. To do both open and close, the script will need to look like this:

```auto
path = 'User Management/Effluent Select'
if event.getCurrentValue().value:
	system.nav.openWindowInstance(path)
else:
	windows = system.gui.getOpenedWindows()
	for window in windows:
		if window.path == path:
			system.nav.closeWindow(path)

```
