Lightbox Communication

So I have a lightbox, but I want it to connect with a certain page so that when you close the lightbox, certain text changes (for example) on a certain page. Is there any way I can do this by making the lightbox communicate with that page/text? Thanks. Here’s the code for closing the lightbox:

export function button29_click(event) {
wixWindow.lightbox.close();

I really just want it to be something like:

exportfunction button29_click(event) { wixWindow.lightbox.close();
(lightbox communicates with page that it has been closed)
$w(‘#text35’).hide()
$w(‘#text36’).show()

So when the button that closes the lightbox is clicked, the text hides and shows

In order to do that, you;ll have to open the lightbox from the page by code and close it by code (disable all the automated closing options.

on the page:

import wixWindow from 'wix-window';//at the top of the code
//code... code...
//...
wixWindow.openLightbox("LightboxName")
.then(data => {
//code to execute once the lightbox has been closed
})

To add to J.D. post above, make sure that you read about close lightbox here too so that you can understand more.
https://www.wix.com/corvid/reference/wix-window.lightbox.html#close

You will also find code examples there that you can run through and see how it all works too.