Anyone have try if onload event will work on onramp iframe?
I am trying to implement the onload() function on iframe
when the page load the iframe will also load on the page
the code right now is not working
anyone can i help?
<iframe onload="chainCrypto()" class="ratio ratio-16x9" id="myIframe" src="" width="180" height="550" ></iframe>
function buyCrypto() {
Moralis.Plugins.fiat.buy();
}
async function chainCrypto() {
let response = await Moralis.Plugins.fiat.buy();
document.getElementById("myIframe").innerHTML = "BUY CRYPTO";
document.getElementById("myIframe").src = response.data
}