HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... JAVASCRIPT?
JAVASCRIPT?
  View type:
developers - can you pass parameters to javascript function using actions JAVASCRIPT?
 
Hi, James!

In fact, it can be made, but we cannot guarantee, that it will work in future versions.

CourseLab variables are stored in arrays. The syntax for calling CourseLab variables from JavaScript:

g_arVars["var_name"] - for global variable
g_arSlideVars["var_name"] - for slide variable

Both arrays are global, var_name is real variable name in this case.
But again - we will not guarantee compatibility with future versions...
 
If you want to add or change a value in a predefined variable, one you have made in the course settings you can.
If you declare a variable at the time of the action again you can add a value to it. It will either be local to the slide or local to the whole module depending on how you declare it in the first place.
Internally, that is within a module is very easy, passing them to outside of the module less easy and not a recommended thing to be doing as it depends very much on how the host PC's security has been set. By default this kind of action is usually blocked.
Subject:
Message options
No additional options