I have a dynamic page with a database of 20 items. On the item pages I have an iframe that has the same code (a viewer for something) and i want to change a url inside this iframe.
I tried the following:
$w.onReady(function () {
// Access the current item in the dataset
const currentItem = $w('#dynamicDataset').getCurrentItem();
// Check if currentItem is defined
if (currentItem) {
$w('#html1').src = currentItem.myURL;
}
});
but it is not working. It does not recognize the urls defined in my database.
What am I doing wrong?