Difference between revisions of "Widget:Ppplanner03"
Line 29: | Line 29: | ||
<script> | <script> | ||
document.addEventListener('DOMContentLoaded', function () { | document.addEventListener('DOMContentLoaded', function () { | ||
+ | let iframeAdded = false; | ||
+ | |||
function showIframe() { | function showIframe() { | ||
// Hide the initial image | // Hide the initial image | ||
document.getElementById('runImage').style.display = 'none'; | document.getElementById('runImage').style.display = 'none'; | ||
− | // Create and configure the iframe | + | // Check if an iframe has already been added |
− | + | if (!iframeAdded) { | |
− | + | // Create and configure the iframe | |
− | + | const iframe = document.createElement('iframe'); | |
− | + | iframe.src = 'https://acp.analytica.com/view0?invite=4711&code=3885603542485212689'; | |
− | + | iframe.style.width = '800px'; // Adjusted width to match the image width | |
− | + | iframe.style.height = '406px'; // | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 00:31, 1 May 2024
<img id="runImage" src="https://docs.analytica.com/images/d/d2/Ppplanner03.png" style="width: 800px; height: 406px;">
<script> document.addEventListener('DOMContentLoaded', function () {
let iframeAdded = false;
function showIframe() { // Hide the initial image document.getElementById('runImage').style.display = 'none';
// Check if an iframe has already been added if (!iframeAdded) { // Create and configure the iframe const iframe = document.createElement('iframe'); iframe.src = 'https://acp.analytica.com/view0?invite=4711&code=3885603542485212689'; iframe.style.width = '800px'; // Adjusted width to match the image width iframe.style.height = '406px'; //