Click to See Complete Forum and Search --> : Calling js file before html tags in Netscape 7 only


florida
12-19-2003, 02:54 PM
I have a call to a Pop up drop down menu Javascript that works great in my Netscape 4.77 and IE such as:

<html>
<head>

<script src="jshere.js"></script>
</head>
<body>
...
</body>
</html>



In my Netscape 7 browser it pops all the menus only in the upper left corner unless I call the javascript like this:

<script src="jshere.js"></script>
<html>
<head>
....
</head>
<body>
</body>
</html>


It works great when I call it like that but why is that?

Please advise why this is happening only with Netscape 7 where I have to call the Javascript before the html tags??
Is there a way to correct this??

Pittimann
12-20-2003, 01:30 AM
Hi!

What about having the script tag a bit more "complete":
<script language="JavaScript" type="text/javascript" src="jshere.js">

Cheers - Pit

florida
12-22-2003, 06:31 AM
Actually it works when I put it right after the <HTML> tag before the <head> tags:


<html>
<link href="file2here.css" rel="stylesheet" type="text/css" />
<link href="filehere.css" rel="stylesheet" type="text/css" />

<script language="JavaScript" type="text/javascript" src="here.js">
<head>
etc...


Any idea why it wont work with Netscape 7 in the head tags? Is this okay to call it outside of the head tags?

ray326
12-22-2003, 03:20 PM
Since I can't see the file I'll look in my crystal ball and say, "Because it has content that is invalid inside the <head>."

MCP
12-23-2003, 12:29 PM
you could try using php or asp to build the page to fit the client's browser.