Links to open different pages in web container

I want to use text links to open different webpages in the “embed a site www container”. How could that be achieved?

Hi Philippe,

First of all , add an HTML embed site element, and create for each “Text Link” a button.

Second , for each “Text Link” ,add an event handler that runs when the button is clicked.
At the event connect the HTML’s src to the URL , as I demonstrate in the example below:

export function textLink1_click(event) {
    $w('#html2').src = "";

Pay attention:
The site you embed using the instructions above must be a site that has a URL that begins with the HTTPS protocol, and not HTTP. If you try to embed a site with a URL that begins with the HTTP protocol, the site may work in preview mode but it will not work on your published site.

For more information on how to work with the HTML Element you can check at the link below:

Have a nice day and best of luck!