Copy link to clipboard
Copied
Hi guys,
Im using a button at the end of a course to close the window or close the course, however, is not working on the platform I'm using, I already try by adding the interaction--Click--close the course, but nothing.
now I just added the script
function cerrarCurso() {
window.close();
if (window.self !== window.top) {
window.parent.close();
}
}
document.getElementById('Botón_46').addEventListener('click', cerrarCurso);
And still nothing, it does not close with the button, I have to close the window manually.
I'm using the recent Captivate (vs12)
Thanks!
Copy link to clipboard
Copied
The JavaScript API for Captivate 12 is radically different from that of all earlier versions. So using JS that worked in Captivate 2019 is not necessarily going to work in Captivate 12.
Just out of interest, have you tried using Captivate's own Advanced Actions to close the course window using the Exit Course command? That would sound a lot simpler to me.
Copy link to clipboard
Copied
@RodWard "Advanced action" is no longer in the glossary of CP2023. I am struggling trying to transfer the AA and especially the Shared actions using the Interaction tool. Know that I use the advanced action as 'storyboard' for those interactions.
Copy link to clipboard
Copied
Yes, I had, but it doesn't close.