Popup Close Button

Does anybody know how to create a "close" button on a popup screen to close itself in Perspective?
I've tried "close popup" on click action, but it does not work. I wonder what I did wrong, or there is no way to create such button.
There is always a close symbol at the to right corner to close the popup screen, but on Touch Screen, it is hard to close it. A button will be way easier for touch screen.

Read the view's id and pass that to closePopup().

Can you give an script example of reading Popup ID and close this ID.
Ignition website does not really have many samples. The syntax is so strange.

The first argument for system.perspective.openPopup is id. This is the id that should be passed to system.perspective.closePopup. If open popup is configured as a navigation option, the id is one of the configuration items.

Pass an identifier when you open the popup

Use that same identifier on a script for your close button

Using the pageID property also seems to work but i would't recommend it:

Thank you so much.
It works.

1 Like

This will work as long as there is only ever 1 Popup opened on the page; once you have more than 1 Popup open it will only close the most recently interacted with Popup (highest z-index).

1 Like

On my perspective project, after I used this method to close popup, there is only one popup can be opened; so it is good; it keeps the screen clean. The operator will have to close it before opening the next popup.