so Im having an issue when i run this code it tells me that the src is not a valid url. if i take out the // in front it works and displays the code in the html box. i dont want the code displayed in the html box i want it to be used in the html box. any suggestions?
// For full API documentation, including code examples, visit http://wix.to/94BuAAs
import wixData from "wix-data"; // activates wix-data
import {session} from 'wix-storage'; // activates wix-storage
$w.onReady(function () {
//TODO: write your page related code here...
let start = session.getItem('1',start);
messageSendButton_onClick(start);
setTimeout(
function()
{
messageSendButton_onClick(start);
}, 1000);
});
export function messageSendButton_onClick(start) {
// send message to the HTML Component
$w('#html1').postMessage(start);
$w('#html1').src = "//https://www.narrpr.com/widgets/avm-widget/widget.ashx/script";
}
But the rprAvmWidgetOptions never gets to do anything. It´s not sent, nothing. Could you try to explain in text or pseudocode what you are trying to achieve?
Tyler, what are you trying to achieve, I don´t get it. In:
export function messageSendButton_onClick(start) {
you first send data to an html-component and right after that you change its URL, rendering thr former postMessage useless. Could you clarify?