Forum Discussion
JoeLloyd-17dcfe
2 years agoCommunity Member
LMS Course Name JavaScript Action
Morning all,
I am hoping someone will be able to support me here, I am trying to have a JavaScript action that will set my "CourseName" the code i am using is as follows;
var player=GetPlayer();...
CraigBunyea-23d
2 years agoCommunity Member
I'll try to help. In your first post you declared a variable (not in your SL project though) simply called course (let's give it a little customization), However you produced the value you wanted in the console, that goes to the right of 'var externalCourseID ='
// the scope of externalCourseID is local only to this javascript snippet
var externalCourseID = classroomName(' **someUniqueParameter**');
// CourseName is a Project Variable
player.SetVar("CourseName", externalCourseID);