Difference between revisions of "Widget:Ppplanner03"
(Created page with "<div id="container" style="cursor: pointer; border: 1px solid #ccc; padding: 10px; margin: 10px;"> <img id="runImage" src="https://docs.analytica.com/images/d/d2/Ppplanner03...") |
|||
Line 11: | Line 11: | ||
const iframe = document.createElement('iframe'); | const iframe = document.createElement('iframe'); | ||
iframe.src = 'https://acp.analytica.com/view0?invite=4711&code=3885603542485212689'; | iframe.src = 'https://acp.analytica.com/view0?invite=4711&code=3885603542485212689'; | ||
− | iframe.style.width = ' | + | iframe.style.width = '100%'; // Adjusted width to match the image width |
iframe.style.height = '570px'; // Adjusted height to match the image height | iframe.style.height = '570px'; // Adjusted height to match the image height | ||
iframe.style.border = 'none'; // Optional: Remove border | iframe.style.border = 'none'; // Optional: Remove border |
Revision as of 23:53, 30 April 2024
<img id="runImage" src="https://docs.analytica.com/images/d/d2/Ppplanner03.png" style="width: 100%; height: 100%;">
<script> document.addEventListener('DOMContentLoaded', function () {
function showIframe() { // Hide the image document.getElementById('runImage').style.display = 'none';
// Create and configure the iframe const iframe = document.createElement('iframe'); iframe.src = 'https://acp.analytica.com/view0?invite=4711&code=3885603542485212689'; iframe.style.width = '100%'; // Adjusted width to match the image width iframe.style.height = '570px'; // Adjusted height to match the image height iframe.style.border = 'none'; // Optional: Remove border
// Append the iframe to the container document.getElementById('container').appendChild(iframe); }
// Add click event listener to the image container document.getElementById('container').addEventListener('click', showIframe);
}); </script>
https://docs.analytica.com/images/d/d2/Ppplanner03.png 1156 570