Jave in the <HEAD>???

belko002

Registered Member
Joined
Jul 4, 2010
Messages
76
Reaction score
14
I'm doing a site audit and ran into a quick question...

Generally speaking, I would think it would be a really bad idea to execute Java in the header, but I'm not 100% sure and don't a ton of Java, so I wanted to make sure before I shoved my foot in my mouth.

The code towards the end of the header looks like:


<script type="text/javascript"no
src="js.js">
</script>
</script> <!-- onmouseout="out('button1')" onmouseover="over('button1')"-->
</HEAD>

Any help or suggestions would be much appreciated!

Thanks ahead of time
 
Just to clarify.. what you written there is JavaScript, not Java. There is a big difference.

Generally defining all of your functions inside the HEAD is actually a good idea becuase this way you know for sure that they are defined before they get used in the BODY.


Code:
<!-- onmouseout="out('button1')" onmouseover="over('button1')"-->
This is just an html comment.


<script type="text/javascript"no
src="js.js">
</script>
</script>
This is some sloppy markup. Are those typos on your part or is that what the code actually looks like?
 
Back
Top