Hi
I have a site which connects to a database via a collection.
One of the database fields is a link (url) to a thumbnail image. I want to display the image in a repeater when onLoad.
Something like <img src=“link” in html.
I need the image itself, not a link to click inorder to view the image.
Any examples ?.
Thank you Elisheva
Try this →
#repeater1 - the repeater
#image1 - image in the repeater…
$w('#repeater1').onItemReady(($item, itemData, index) => {
$item('#image1').src = itemData.link;
});
(THIS WORKS , ONLY, WHEN THE REPEATER IS CONNECTED TO A DATASET)
otherwise, you should query your database
Thank you - got it to work
Where do I put this code?