Add HTML menu as webobject
Hi
I know this is to push the concept of scorm but it would let me do so much more than what only using captivate would do.
I am trying to add a HTML menu to captivate Classic.
It seems that Captivate is blocking tthe javascript inside the webobject.
The menu looks the way I want, is clickable but wont jump to the different slides.
This is the latest javascript I am trying.
// Function to navigate to a specific slide in Captivate from within an embedded HTML environment function navigateToSlide(slideNumber) {
if (window.parent.cpAPIInterface && typeof window.parent.cpAPIInterface.navigateToSlide === "function") { window.parent.cpAPIInterface.navigateToSlide(slideNumber); }
else { console.error("Captivate API is not available in the parent window."); } }
// Wait until the document is loaded, then set up event listeners document.addEventListener("DOMContentLoaded", function()
{ console.log("Menu loaded and ready to connect to Captivate."); document.querySelectorAll("#customMenu a").forEach((link, index) =>
{ link.addEventListener("click", function() { navigateToSlide(index); }); }); });
