Ajax call to a method that prints javascript

Ok,I have a some javascript code in the databaseTable: jsSnippetsField: snippetType: Text \[code\]<SCRIPT SRC="https://svc.com/somestuff.js"></SCRIPT><script>var fubar = 'stuf'send_some_stuf_to_svc(fubar) // sends some data to a service :)</script>\[/code\]So i have N number of this JS snippets will that code work if a server side method was called via Ajax call, for example:\[code\]$.ajax({ type: 'GET', url: path + '/doTheJSStuff/', )};\[/code\]where the doTheJSStuff is a method that echo/prints the JS code
 
Back
Top