Setting the source of an HTML component in a Lightbox

Hi everyone,

I have been trying to get a feature of my website, that when users click a button in a dynamic page of my website, a Lightbox opens, in that Lightbox I want to display an HTML component that displays a url from the dynamic datasets current Item: Something like this:

let currentItem = $w("#dynamicDataset").getCurrentItem();
$w("#html2").src = currentItem.package1VcitaLink;

In this case the .package1vcitaLink is the field that contains the URL from the database.
These lines of code work fine in the dynamic page, however, in the Lightbox, since there is no dynamicDataset, they do not work, does anybody have any ideas to see how could this be accomplished?

Thank you,

I appreciate any help I can get,

Sincerely,

Nicolas

Hi,
On the dynamic page code, you can open the lightbox and send an object of the HTML code as explained here . Than, on the lightbox, you can get the object using the getContext function.

Good luck,
Tal.