Javascript functions outside DTL files

Moderator: crythias

Locked
GardenDwarf
Znuny newbie
Posts: 14
Joined: 09 Jul 2013, 17:54
Znuny Version: 3.2.6

Javascript functions outside DTL files

Post by GardenDwarf »

Hello,

I have created a javascript file containing 2 functions in the folder var/httpd/htdocs/js.
Those functions are containing the code I formerly wrote into a DTL file (AgentTicketPhone) and - after registration into the SysConfig - it is working quite well.

The prolem is that I was referring to some $ENV{"..."} variables into the DTL code, which is not working into the Javascript file anymore.
The solution for now was to provide the environment values as arguments to the function, but I was wondering if there is a way to access them directly from the javascript file.

Thank you in advance.
Locked