Passing Lectora Var to JavaScript

I'm trying to pass the value of a Lectora variable to a JavaScript variable. However, all I get is that the JavaScript variable is "undefined."


Here's what I'm working with...


I've created an External HTML Object (type "Other") that contains...



var JSVariable = _LectoraVariable.getValue();


I searched around and thought that this would do the job. The variable "_LectoraVariable" is defined in Lectora and does contain a value, so I know that there is something to pass, but when I pass the value out to the JavaScript variable and then try to display it, all I get is "undefined."


What am I missing here?


Thanks!

Discussions have been disabled for this post