JS/Storyline help - Commit(); status
I'm trying to put together an alert if the SCORM 2004 package fails to communicate with the LMS.
Let's pretend this is called when a user clicks an object, and the alerts (one for success, one for failure) are on layers. There's a piece in italics that I'm not sure about. Can anyone help me flesh this out? Seems like it might be useful to lots of folks.
Thanks in advance!
Trigger 1 (to make sure the player is got, commit, & return status of commit call to player)
var player = GetPlayer();
Record response, either True or False, to JS variable commitstatus
Trigger 3 (show alert - successful)
Show layer Success when user clicks if CommitStatus is equal to True.
Trigger 4 (show alert - successful)
Show layer Failure when user clicks if CommitStatus is equal to False.