Call javascript trigger to commit or setValue in Scorm 1.2
May 04, 2015
Hi guys,
I tried to set a javascript trigger to set a value and commit it afterwards (my scorm API does not send after each setValue).
I added a javascript trigger to a next button and wanted to trigger each time it is pressed. This works but when excecuting my method it fails because the referenced objects or methods are not defined (I can see this in the browsers debug console). The Project is exported as html5.
I tried
LMSSetValue("screen", "Screen 1");
and
LMSCommit("");
And also
API.LMSSetValue("screen", "Screen 1");
API.LMSCommit(""); -> where API is my global custom LMS interface
What is the correct way to call the LMS methods from javascript triggers?
My goal is to send the slide number on button press to a custom LMS which is based on scorm 1.2, but does not support the complete scorm 1.2 standard.
Is the slide number saved in a player variable which I'm able to query?
Any ideas? Thanks for your help, best Astrid
2 Replies
Hi, Astrid - Although we don't provide support for JavaScript coding, the following information will help when you're developing JavaScript triggers in Storyline. Hopefully, some of our experts in the community can chime in with suggestions!
Hi Astrid,
I think you're closer with
LMSSetValue("screen", "Screen 1");
screen isn't a valid SCORM variable though. Take a look at cmi.core.lesson_location
See: http://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/
This discussion is closed. You can start a new discussion or contact Articulate Support.