Difference between revisions of "Widget:Portfolio opt iframe"

Line 11: Line 11:
 
     // Create and configure the iframe
 
     // Create and configure the iframe
 
     const iframe = document.createElement('iframe');
 
     const iframe = document.createElement('iframe');
     iframe.src = 'https://acp.analytica.com/view?invite=4714&code=4200729999208732852';
+
     iframe.src = 'https://acp.analytica.com/view?invite=4719&code=3488038814222961478';
 
     iframe.style.width = '900px'; // Adjusted width to match the image width
 
     iframe.style.width = '900px'; // Adjusted width to match the image width
 
     iframe.style.height = '700px'; // Adjusted height to match the image height
 
     iframe.style.height = '700px'; // Adjusted height to match the image height

Revision as of 17:44, 2 May 2024

 <img id="runImage" src="https://docs.analytica.com/images/3/39/Ppplanner02.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/view?invite=4719&code=3488038814222961478';
   iframe.style.width = '900px'; // Adjusted width to match the image width
   iframe.style.height = '700px'; // 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>