I wonder if you're just trying to lazy load a JavaScript file from a URL, but that isn't your question, so I'll ignore that.
You can do just about anything, but that doesn't mean you should. You can't directly make an Ajax call to JavaScript. That's just a meaningless statement... The semantics of what you actually said would require an Ajax call to a server that has the ability to execute JavaScript code like a browser would, which can be done with a headless browser like PhantomJS. So, you would have to install PhantomJS on your server, Ajax to the server, have the server use PhantomJS to process some JavaScript code, then have the server respond to the Ajax call with whatever result you come up with.
I have to reiterate: You should not do this ^.
It would be like traveling the world to get to your neighbor's house. Anything that is possible within all of that mess, you could have just done it in the JavaScript code on the page or on the server in the server-side language.