Forum Discussion
Exit SL via JavaScript
I'd like to write a script that alerts the learner and exits the course after learner acknowledgment.
I could do a window.close() but some LMS encapsulate the course so using the built-in SL EXIT trigger would be better.
Is there a tried-and-true way to activate a trigger or otherwise invoke the SL EXIT from JavaScript?
17 Replies
- RobTaoCommunity Member
Will do that Math, thank you again!
Rob
- RobTaoCommunity Member
Hi Math,
I'm hoping to pick your brain on another sample I have. Unfortunately the sample you've sent is completely revised now. Me and a programmer manage to apply a sample work around. The file attached is a stripped down version for the client.
The only pages that wouldn't automatically exit the course, after a time out, were multi layers slides. in fact, the invisible, to allow the user to continue the course also wouldn't show up.
If anyone else would like to help, would be great appreciated.
Thank you, Rob
- MathNotermans-9Community Member
Although not perfect this one, my previous approach with a Javascript Timer does work even with layers. In fact the exit is triggered on a Slide Layer itself.
What might be missing from your sample is a timer. And i did notice some choices on Slide Layer behaviour that might cause it not to work.
However this sample works and closes the SL after a minute automatically... on any slide on any layer....
Kind regards,
Math - RobTaoCommunity Member
Math, thank you so much again. It was the programmer who suggested the idea to make the switch. You've really help me out, thank you!!
Rob
Related Content
- 5 months ago