LMS API works fine but navigation breaks when tried move forward or backward.

Jul 24, 2023

Hello everyone,

I'm using javascript in SL 360 to retrieve User name with the help of LMS API as shown in the below code. The slide that I use to show username works fine while I test in LMS, but the navigation breaks (it just keeps buffering...) when I try to move to a different slide.

Please help me resolve the issue as I don't see enough threads in regards to this issue. Below is the javascript that I used in my SL file.

function findLMSAPI(win) {
// look in this window
if (win.hasOwnProperty("GetStudentID")) return win;

// All done if no parent
else if (win.parent == win) return null;

// Climb up to parent window & look there
else return findLMSAPI(win.parent);
var lmsAPI = findLMSAPI(this);
var name = lmsAPI.SCORM2004_GetStudentName();

var nameArray = name.split(',');
var firstName = nameArray[1];
var lastName = nameArray[0];
var fullName = firstName + ' ' + lastName;
var player = GetPlayer();
player.SetVar("LastName", lastName);


Be the first to reply