<script> has a
src then the text content of the element will be not be executed as JS (although it will appear in the DOM).
You need to use multiple script elements.
<script>to load the external script
<script>to hold your inline code (with the call to the function in the external script)