I need help with organizing some JavaScript code that needs to access server-side data. I want to keep this code in a separate .js
file, but I'm having issues populating it with the necessary server information using moustache. Here is my current setup:
<body>
<script type="text/javascript" src="/js/test.js"></script>
</body>
This is what my .js file looks like:
var testField = '{{someValue}}';
alert(testField); // returns null
Any suggestions or solutions are greatly appreciated.