Exit button error for Scorm

I have a problem with a button with custom javascript.

I made the “Exit” button works correctly in test mode.
However when exporting to Scorm, the button closes the project but does not close the browser window.
Here is the code used:
window.close ();

Is there a script to close the window?


The script window.close (); only helps to close the browser tab which is opened by script. Therefore, you should configure to open your course in a new window/tab when uploading the SCORM package to the LMS for the script to work.


Good Morning.
Yes, even when opening in a new window, the script does not work. The project just stops working but the window is not closed.

Follow link:

I managed to close the tab using the following command:

var tab = window.open(window.location,"_top");
1 Like


If so, the course is embedded in an iframe by your LMS.
If the top window and the iframe have the same domain, you can use window.top.close();


1 Like