Forum Moderators: open
</body>
</html>
<script language="JavaScript" src="hits.jsp"></script>
I thought the JavaScript needed to be between the head or body tags.
Thanks
David
Of course, properly speaking, the <script> tag is HTML markup, so it belongs within the html element. But practically speaking, it doesn't seem to matter.
However, because the browser will parse the HTML document from top to bottom, this particular positioning you quoted means that the script will be the very last thing to execute. If it really is a hit counter script (as it seems to be from its name), people who bail early from the page won't get counted. In fact, you can get some intersting stats by running the same code as the first thing on the page, and then the last thing.
While you're digging into this area, you might as well have them change the long-time deprecated "language=" attribute. It should read:
<script type="text/javascript" src="hits.jsp"></script>