I'm adding an "Exit" button in the tabs area of my Storyline 2 project. I'm looking for the javascript code to do this. I've tried window.close(); when the user clicks but it doesn't seem to work. I've tried window.print(); just as a check and that works. Can anyone help me out? Thanks. Lou
Articulate Storyline supports JavaScript triggers, letting you extend the functionality of your courses. Although we don't provide support for JavaScript coding, we do have this article that will help when you're developing JavaScript triggers in Storyline.
Hopefully someone in the community will be able to pop in and assist with your particular question.
Hi Lou. If your course is opening in a new window, useself.close(); instead of window.close();
This is because window.close(); is intended for windows opened using the window.open(); method. So that command would fire from the original window that opened the course rather than from within the course itself. Self.close(); will close pop-up window containing the course.
3 Replies
Hi Lou!
Articulate Storyline supports JavaScript triggers, letting you extend the functionality of your courses. Although we don't provide support for JavaScript coding, we do have this article that will help when you're developing JavaScript triggers in Storyline.
Hopefully someone in the community will be able to pop in and assist with your particular question.
Hi Lou. If your course is opening in a new window, use self.close(); instead of window.close();
This is because window.close(); is intended for windows opened using the window.open(); method. So that command would fire from the original window that opened the course rather than from within the course itself. Self.close(); will close pop-up window containing the course.
I've tested this in SL360. Hope this helps.
-Ken
Thanks for chiming in to share, Ken.
I'm not sure if Lou is still subscribed here, but it could certainly help someone that runs across this conversation in the future.
Welcome to E-Learning Heroes!
This discussion is closed. You can start a new discussion or contact Articulate Support.