How to detect opened WebDialogs

Hi all,

Most of the part in my app I use containers to show different “pages”, there yet still some palces I am using WebDialogs to allow the user for record editing. When the user clicks on “Logout” in the main page, I would like to detect all opened WebDialogs and close them automatically. There is session.PageCount but it seems to show active WebPages only, what about WebDialogs?

If you’re using modal dialogs the user shouldn’t be able to do that as there’s a modal overlay over the page.

I think you are looking for something like this: <https://xojo.com/issue/23819> Feel free to add your voice there :wink:

If you use an array property on the WebPage to instantiate all your webDialogs, you can very simply close all of them by cycling through the array.

Thanks all, will see if make them all as modal or use Michel’s way, which best suits my situation. Thanks again.