Call a js from a js? How?
This question is a challenge. I've been tasked with executing some javascript commands from within a limited CMS framework. Due to this framework, I am unable to write code directly. But what I can do is upload js files into the body tag of the document.So instead of simply writing:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
and then later:
<script type="text/javascript">
//various commands here that refer to the Google file
</script>
I need to call that external file from within the js file that I upload. And then do the commands as well.
I can separate the call from the commands and put them in different js files if needed.
I've read other posts here that talk about calling a javascript file from another javascript using document.write but they didn't work. Another post used jQuery, but don't I have to call the jQuery library to begin with, which puts me back in square one.
Any insight would help.