How to pass a variable to Javascript a Control Application

It seems next to impossible to pass a global variable into the Controls Javascript .
I have a global variable agentID, how for the lifewhich is passed to my control app (sample1). I need to use agentID in the JavaScript.

Please how for the life of me is this possible?

you can do jsvar = <?php.echo [global_sc_var]; ?>;

Thanks Frank got it

🚀 Scriptcase 9.12 is now available! Check out the new features here 👉🚀 Next Monday (02/24), Scriptcase 9.12 will be released! Check out the new features before anyone else 👉