I have a two tags in my page as below:
<![CDATA[
<script type="text/javascript" src="Somejavasrcipt.js"></script>
<script type="text/javascript">
callingThisFunction("Hello-_-Hello");
</script>
I tried to remove the two tags and put everything into one, something similar to as below:
<script type="text/javascript" src="Somejavasrcipt.js">
callingThisFunction("Hello-_-Hello");
</script>
But when I moved everything under one script tag, the function
callingThisFunction("Hello-_-Hello")
is not called porperly. Is there any specific reason why it that occuring. Cant we put src attribute in a tag like this. Or what am I doing wrong.
The src attribute identifies to the browser both that the Javascript code is to be read from an external file (ignoring the content between the script tags if there is any) and also the name and location of the file that containsd the scriptsource