I can add an iFRAME using the Add option and edit the iFrame HTML. But what I wanted it to CODE it in the WIX editor and invoke the same on a button click or so. I don’t see any way of doing so. Would really appreciate, if I can do so. For instance, let us say this is the code -
Hi,
The iFrame is for adding HTML elements to your site and is not related to Corvid.
Corvid by Wix only allows you to add JavaScript code to a Wix site.
If you are displaying something in the iFrame you can create interactions with it like setting the iFrame to be hidden and then appear after an onClick event with some code like this.
function showIframe() {
$w("#button1").onClick(() => {
$w("#html1").show()
})
}
So just to be a clear, you can use Corvid to interact with an iFrame that you have added using the Editor but you cannot use Corvid to interact with your HTML code.
I hope his helps!
Dara | Corvid Team
Hi Dara, I appreciate your response to my query. I don’t need to hide it and show, but just need to CHANGE some information that is shown on the HTML iFrame and I need to invoke the change through the JAVASCRIPT code upon the submit of a button. Any way to do so? Would really appreciate your help - if that is NOT POSSIBLE, is there any WORK-AROUND? Am damn upset with the SHORT OF FEATURE on this aspect. Don’t want to have it hard-coded. Hope, you know what I mean. Thanks and hope to get a response from you at the earliest on this. Have a great day. Stay home, stay safe & healthy.
You might want to consider using a Custom Element .
You can create a script to be embedded in an HtmlComponent that modifies itself by using content sent by message from the page to the HtmlComponent . For more information, see the article Working with the HTML Component in Corvid .