i added an html element where i redirect to other pages on click using <a href="wix-url-of-the-page"></a>, 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..
Community X.
Connect with other creators, share ideas, give feedback and get the latest product updates.
Search
Mar 30
how can i redirect from inside and embeded HTML element? the href doesn't redirect.
how can i redirect from inside and embeded HTML element? the href doesn't redirect.
2 answers2 replies
0

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: https://idoh33.editorx.io/mysite-122 Hope this helps!
Yes , this works perfectly , Thank you so much !
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 ?