Hi everyone,
I have a javascript function in *.js file. This function has to access to variable set by server.
I've tried setting the variable in *.js like this;
function dummy(){
var myText = '#(myText)#';
}However it seems like the webserver doesn't understand this coding convention. The js file sent back to client set myText in dummy() with the hard-value #(myText)#. It's not the value of myText variable in server side.
I know I can achieve this by putting dummy() directly in csp file. However I have to put dummy() in separated file, so that other files can use it.
My current work-around