Exit button error for Scorm

Hello.
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?

Hi,

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.

Regards,

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:
https://mega.nz/#!NxE22CbY!A8MgMlgPSUf5UDuoWV42uEKd2WKd_IQfxd8M2zUDZSY

I managed to close the tab using the following command:

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

Hi,

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();

Regards

1 Like