I'm having trouble referencing variables on frames that occur after they are declared. For example, on the first frame of a course, window.open on the last line successfully opens the window with passURL as the URL.
//Ask the LMS object to get the name
var rawName = lmsAPI.GetStudentName();
var rawID = lmsAPI.GetStudentID();
var Office = 0;
var Field = 0;
var Drive = 0;
var passURL = "https://thisURL.com/CompleteCourse/SafetyForLife?userid="+rawID+"&office="+Office+"&field="+Field+"&drive="+Drive;
If I replace the passURL with a regular URL on the second frame, the window opens and everything works.
What am I doing wrong? How can I successfully reference passURL (and all the variables in encompasses) from any frame in the course? Does it need a GetVar? (That doesn't seem to fix the problem, but maybe I'm doing it wrong.)