Web: Change Webpage content, under a modular WebDialog?

Because I have no luck in the German forum [ https://forum.xojo.com/41415-web-webpage-inhalte-unter-einem-webdialog-andern ], I try the same question in English:

I have a WebPage with “Implicit Instance” switched to “Off”.
I open it this way:

DIM MZWebPage_Ansicht as new MZWebPageVorlage_Ansicht
MZWebPage_Ansicht.show

At this MZWebPage_Ansicht I have a label.

Now, I open a modal WebDialog, this covers the WebPage.

If I change something in the WebDialog and close the WebDialog, the label should get a new value.

How can I update the label, after closing the WebDialog?

Usually this way:

MZWebPage_Ansicht.Labelname.Text = "neuer Inhalt"

But this is not possible, because of the implicit off. In Source Code, the Editor doesn’t know that MZWebPage_Ansicht exists.

Another thought is, that I can you the dismiss - Event of the WebDialog, but I don’t find a way to detect the MZWebPage_Ansicht is the active again.

[A bad solution would be a timer. I run out of ideas. :frowning: ]

Disclaimer: I’m not a Xojo Web user.

As usual you should define the communication between your windows in a generic way. For desktop I usually do an init routine that simply gives back the value so that the caller window can do it’s thing. If this is not possible for Web you could do an observer pattern or a notification. The latter usually ends up in spaghetti code while the former is a bit more work.

This is the approach I would use. To be clear, when the Dismissed event fires, the page is already active.

Add a handler method on the webpage to handle the dismissed event of the dialog. You can feed the label with the appropriate values from the dialog in this manner. Look in the language reference for addhandler.

If you do that, make sure you call RemoveHandler when it’s called.

Thank you.

I solved it using a Timer and a AddHandler.

You don’t have to use a timer with addhandler. I use it all the time with datepickers, search dialogs for document or partner search, etc. without a timer. Just don’t forget to remove the handler once the treatment of the data is completed.