/    Sign up×
Community /Pin to ProfileBookmark

Calling js file before html tags in Netscape 7 only

I have a call to a Pop up drop down menu Javascript that works great in my Netscape 4.77 and IE such as:

[code]
<html>
<head>

<script src=”jshere.js”></script>
</head>
<body>

</body>
</html>
[/code]

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

[code]
<script src=”jshere.js”></script>
<html>
<head>
….
</head>
<body>
</body>
</html>
[/code]

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??

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@PittimannDec 20.2003 — Hi!

What about having the script tag a bit more "complete":

<script language="JavaScript" type="text/javascript" src="jshere.js">

Cheers - Pit
Copy linkTweet thisAlerts:
@floridaauthorDec 22.2003 — Actually it works when I put it right after the <HTML> tag before the <head> tags:

<i>
</i>&lt;html&gt;
&lt;link href="file2here.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="filehere.css" rel="stylesheet" type="text/css" /&gt;

&lt;script language="JavaScript" type="text/javascript" src="here.js"&gt;
&lt;head&gt;
etc...


Any idea why it wont work with Netscape 7 in the [b]head[/b] tags? Is this okay to call it outside of the head tags?
Copy linkTweet thisAlerts:
@ray326Dec 22.2003 — 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>."
Copy linkTweet thisAlerts:
@MCPDec 23.2003 — you could try using php or asp to build the page to fit the client's browser.
×

Success!

Help @florida spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...