Email conversation
From | Kalin |
---|---|
Date | 5 April 2004 13:00 |
This is the result of a chat on IRC. I don't normally document these, but I figured the points that this raised were important enough.
Kalin was following an online JavaScript tutorial, and had been caught out by a mistake in the tutorial. Basically, he was doing this:
<script src="externalScriptFile.js"> someFunctionInTheExternalFile(); </script>
I pointed out that script tags can either import or embed scripts, but not do both, so the correct code would be:
<script src="externalScriptFile.js"></script> <script> someFunctionInTheExternalFile(); </script>
I also pointed him to the part of my tutorial that deals with importing and embedding scripts. He is now using my tutorial to learn JavaScript.