Question
Javascript in published SCORM files
I'm not a guru in javascript, Currently I'm working in a project which someone else was working on it for a long period of time. He prepared some sort of codes in javascript to track number of attempts in SCORM and trigger some battons. I have been given these codes and I don't know where to put them, I'm seeking help to anyone with Javascript knowlege who can assit where to keep these codes in my SCORM files.
var interfaceObj;
var eventEmitterObj;
window.addEventListener("moduleReadyEvent", function(evt) {
//evt.Data carries the interface object.
//It is same as window.cpAPIInterface
interfaceObj = evt.Data;
eventEmitterObj = interfaceObj.getEventEmitter();
//check if window.cpAPIInterface is available
if (interfaceObj) {
//check if window.cpAPIEventEmitter is available
if (eventEmitterObj) {
.
.
.
.
});
