I’m engaged on a easy Javascript mission that ought to have the ability to ship a variable worth to a variable within the mission and leap to the subsequent slide however I get every kind of bizarre javascript points.
Right here is the code:
window.cpAPIInterface.setVariableValue(“q01”, “1”);
window.cpAPIInterface.subsequent();
Principally, it ought to set the variable in captivate and leap to the subsequent slide.
I’ve checked the variable worth and tried the worth of 1 with and with out quotes, even tried including textual content to the worth and am getting the next errors.
I maintain getting a number of random errors. Principally consisting of…
SyntaxError: lacking ) after argument record
at eval (nameless)
at a.runJavascript (eval at e (CPXHRLoader.js:37:226), <nameless>:643:175)
at eval (eval at executeAction (eval at e (CPXHRLoader.js:37:226)), <nameless>:1:4)
at cp.Film.executeAction (eval at e (CPXHRLoader.js:37:226), <nameless>:965:432)
at b.clickSuccessHandler (eval at e (CPXHRLoader.js:37:226), <nameless>:890:426)
at b.clickHandler (eval at e (CPXHRLoader.js:37:226), <nameless>:889:167)
at b.ch (eval at e (CPXHRLoader.js:37:226), <nameless>:889:225)
at f (eval at e (CPXHRLoader.js:37:226), <nameless>:255:186)
at a.handleClickExternal (eval at e (CPXHRLoader.js:37:226), <nameless>:258:274)
at a.handleClick (eval at e (CPXHRLoader.js:37:226), <nameless>:259:327)
however I don’t see any errors within the javascript and I adopted code I utilized in different initiatives. I uploaded the mission to the web and every thing. Do I’ve to do one thing else like name a variable and set it then, publish it to captivate with the variable as the worth. This doesn’t make sense. I believed this could be easy and simple… I can get a console.log(“testing”); name to run however it gained’t push the variable worth or leap to the subsequent slide. HELP PLEASE!!!