How can i redirect from inside and embeded HTML element? the href doesn't redirect

i added an html element where i redirect to other pages on click using <a href=" wix-url-of-the-page ">, but this opens it inside the current page it does not redirect (the url does not change), i also tried window.location and everything else. if anyone has any idea, please let me know…

What about opening in a new window? will that work for you?

Thank you for your answer, that would be a temporary fix Thank you , but i want to access the window object from inside the HTML element. do you know if that is even possible please ?

You can use postMessage in the html element, and onMessage in your velo code to achieve this:

this is the code for the html component

This is the Velo code that receives the message from the html component:

url for example i made:
Hope this helps!

Yes , this works perfectly , Thank you so much !

1 Like