I want to to do an innerHTML of my calendly when I click on a button but it doesn't work.
This is my code :
const calendlyCode = `
<div class="calendly-inline-widget" data-url="https://calendly.com/MYCALENDLY/30min" style="min-width:320px;height:630px;"></div>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js" async></script>
`;
function showCalendly() {
document.getElementById("calendly-area").innerHTML = calendlyCode;
}
But if I put text in the middle of the two divs, the text is displayed. So it's not the DOM manipulation that is the problem.
Thank you.