Hi all
I want to create a program that calls the function on the Wix side when someone click on the HTML link.
The following is the program I created.
(1)HTML side
<!doctype html>
<body onload="sendLoadMessage ();">
<script src="//****.com/8**k" onclick="showAlert();"> // ****.com/8**k is outside link
</script>
</body>
(2)Wix side code
$w.onReady(function () {
//TODO: write your page related code here…
$w(“#html1”).onMessage( (event) => {
console.log("message recieve 2");
});
});
export function html1_message_1(event, $w) {
//Add your code for this event here:
console.log(“message test”);
}
I want to receive the event that HTML was clicked, but I can not make it well.
Could you tell me what to do?