# Add script on click of close icon on a popUp screen in perspective

**URL:** <https://forum.inductiveautomation.com/t/add-script-on-click-of-close-icon-on-a-popup-screen-in-perspective/66622>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 17, 2022, 6:45am UTC](https://forum.inductiveautomation.com/t/add-script-on-click-of-close-icon-on-a-popup-screen-in-perspective/66622 "2022-11-17T06:45:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user66](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@user66](https://forum.inductiveautomation.com/u/user66)\
**Post date:** [November 17, 2022, 6:45am UTC](https://forum.inductiveautomation.com/t/add-script-on-click-of-close-icon-on-a-popup-screen-in-perspective/66622/1 "2022-11-17T06:45:44Z")

</div>

Hi all,  
Is there any way to add script on click of close icon( ✖) on a popUp screen in perspective.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 17, 2022, 7:42am UTC](https://forum.inductiveautomation.com/t/add-script-on-click-of-close-icon-on-a-popup-screen-in-perspective/66622/2 "2022-11-17T07:42:26Z")

</div>

You could make your own close icon

---

<div class="post-metadata">

**Author:** ![user66](https://avatars.discourse-cdn.com/v4/letter/u/b487fb/32.png) [@user66](https://forum.inductiveautomation.com/u/user66)\
**Post date:** [November 17, 2022, 8:14am UTC](https://forum.inductiveautomation.com/t/add-script-on-click-of-close-icon-on-a-popup-screen-in-perspective/66622/3 "2022-11-17T08:14:21Z")

</div>

yes...Thanks. Feels like we can also give the script on shutDown of the view and give "if" statement for the script to be executed  
Thanks for this ☺
