Linking between Hype javascript scripts?

Hola,

Perhaps I've missed some parts in the documentation, but I'm wondering if its possible to communicate between Script files without putting everything in the head html.

For example if I have these js files within hype: myScriptA() and a second myScriptB(). Right now these don't communicate, so variables set in script A will not talk to the script B unless I make it a global variable in the head.

Is there a possibility to have these scripts talk with eachother? So for example in myScriptA() I want to reference to a function in myScriptB(), is there some hype syntax to reference other js files?

it's hypeDocument.customData ...

3 Likes

... and a global var can be defined anywhere ... just use window.yourVar = 'reachMeEveryWhere'

2 Likes

Perfect, this was what I was looking for!