I have created several JavaScript functions in the resource library.
I would like to call one function [in this case displayScore()] from within another JavaScript function, [in this case initializeWidget()]. Can this be done? If so, how?
All attempts have thus far resulted in this type of failure:
displayScore(); produces the error: Error in initializeWidget: TypeError: hypeDocument is undefined
or
hypeDocument.functions().displayScore(); produces the error: Error in initializeWidget: ReferenceError: displayScore is not defined
I think
hypeDocument.triggerCustomBehaviorNamed(‘customBehaviorName’)
is another way to trigger any javascript, without having to set unique element id’s.