HTMLComponent Code

Fig.1. – This is how my view should look in Fig.2, what am I doing wrong?

//HTMLComponent Code


Fig.2.

//HTMLComponent Code
<! doctype html >
< html >
< head >
< script type = “text/javascript” >
function init () {
window . parent . postMessage ( “SendURL” , “*” );
window . onmessage = ( event ) => {
if ( event . data ) {
console . log ( “URL Get” );
insertMessage ( event . data );
}
}
}
function insertMessage ( msg ) {
window . location . href = msg
window . parent . allowFullScreen = true ;
} </ script >
</ head >
< body onload = “init();” >
</ body >
</ html >

//onMessage Event
export function button13_click(event) {
  // Add your code for this event here:     $w("#html2").postMessage("https://www.conventus.dk/dataudv/www/kontaktside.php?foreningsid=4265&gruppe_type=1&gruppe_id=547126&num_cols=4");
}

Please post your questions in the correct forum category. This post is being moved Community Discussion.

This forum is dedicated to Velo and and can’t provide support for HTML scripts. Adding code to an HTML component is not a part of the Velo product (which is what this forum is about). You will need to check with the service provider to find out how to get it work.