link html box to repeater with pagination

So I’ve been lurking in the forums for a while… greatly appreciate the thriving community here!

I already have my html box source connected to my dataset, but I can’t seem to figure out a way to link it to my pagination. I have a column in my dataset that has about 46 url entries. My repeater only shows 1 item at a time. I want the html box source url to match the getcurrentitem of the pagination. here’s my code (remains static on the first dataset entry):

$w(“#dataset5”).onReady( () => {
let item = $w(“#dataset5”).getCurrentItem();
let url180 = item.spendChart180
$w(‘#html1’).src = url180;
})

I’m thinking I want some sort of hook? Or onChange event on the pagination?

Hi.

If you are using a dynamic page, you can follow this tutorial: Corvid Tutorial: Creating Previous and Next Buttons for a Dynamic Item Page with Code

If you are using a static page, then you can just link the pagination bar to your dataset via data binding as instructed here: Adding and Setting Up a Pagination Bar

Good luck!