The content has ended. You may close the window - HTML code to add a close button

Oct 29, 2020

Hi there, 

When a student completes a SCORM activity, they get the message: The content has ended. You may close this window.  However, it lacks an obvious way to "close the window". In the article of Articluate 'Customizing the closing page' it is stated that you can change the text and add a Javascript to add a close button.

I myself have no knowledge of html/ Javascript. Does anyone have a code for a close button? That can be added to the goodbye.html file? The intention is for the student to return to the LMS system (Moodle).

I hope someone can share this with me! Thanks in advance!

2 Replies
Judy Nollet

Hi, Melanie,

I attached an edited goodbye.html file that includes a "Close this Window" button. 

Here's what the message looks like when viewed in a browser:

Here's what this file looks like when opened by Notepad:

I highlighted the Notepad image to show you where you can edit text.

  • The yellow highlighting shows the main message. (FYI: the <br> indicates a line break.)
  • The purple highlighting shows the line that adds the button to close the window. You can edit the "Close the Window" text, if desired. Just leave the rest of the scripting intact. 
Joseph Francis

I bypassed this by including code to close the browser window directly In Storyline. On the last slide, add an "Execute Javascript" trigger.  Change the "When" to "When the timeline ends on this slide."

In the Javascript window, enter the following:

window.top.close();

Change the timing of the slide from the standard 3-5 seconds to .25 seconds (the absolute minimum).

This discussion is closed. You can start a new discussion or contact Articulate Support.