Can anyone help?

I’m trying to use a text element - link to navigate between pages on my site. I want to use Velo code to send session variable information to the next page. I set up the text element with an onClick event handler that creates an export function. In the function I set the session variable. I also have the text elements link property set to go to the new page. Problem is when I click on the text-link it takes me to the new page alright but the session variable information in the export function does not get updated (executed).

Would appreciate any help with what I’m doing wrong or what I need to do to make this work. Thanks

what kind of data ? you can use query params in combination with Wix Location to()

Thanks. I’ll look into the reference provided. It’s just simple data - using session storage and local variables.

you can use session storage and retrieve it if user goes into a certain page as well. but it’s a but tricky to get right

Hey @statsportsgames !

To send data between pages, there’s a couple of ways of achieving it - session storage; databases; params.

The problem you’re facing is the text is linked directly on the element rather than via code.

You’d need to use the wixLocation to() API to navigate to the page - to - Velo API Reference - Wix.com

Something like

$w("#button").onClick(() => {
	session.setItem("key", "value");
	wixLocation.to("/page")
})

The Velo forum or Velo Discord might be a good alternative for code help