/    Sign up×
Community /Pin to ProfileBookmark

External javascript OK in IE7 – NOK in Firefox.

Hello,

I did a search and visited the issues regarding external Javascript but found no answer.

I have the following script:

var today = new Date();{
document.write(“<font size=3>”+”<strong>”+ “XXXX X WWW zzzzz”+ “<br/>” + ” ” + “Copyright” + ” ” +today.getFullYear() + ” ” + “Automated Software Tools Corporation “+”<br/>” + “This is part of z390 distributed under open source GPL License.” + “</font>” + “</strong>” + “<br/>”); }

in a folder called Scripts and saved with the name of [B]myjs.js[/B]

In order to execute it:
<SCRIPT LANGUAGE=”JavaScript” SRC=”[B]C:level1Scriptsmyjs.js”></[/B]SCRIPT><br/>

[COLOR=”Red”]Javascript is ENABLED in both browsers !!!![/COLOR]

[COLOR=”RoyalBlue”]This works under IE7 [/COLOR]but [COLOR=”Red”]doesn’t work under Firefox.[/COLOR]

Could someone explain to me why this is [B]not[/B] working under Firefox?

Thank You for any hint.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@cgishackFeb 01.2008 — dont use the FILE path like that...

use a URL,

<SCRIPT LANGUAGE="JavaScript"SRC="http://localhost/myDir/MyJS.js"></SCRIPT>

or depending on where the script is...

<SCRIPT LANGUAGE="JavaScript"SRC="../MyJS.js"></SCRIPT>
Copy linkTweet thisAlerts:
@pakoauthorFeb 07.2008 — Done.


Thanks for the help.
Copy linkTweet thisAlerts:
@KorFeb 07.2008 — <script [COLOR="Blue"]type="text/javascript"[/COLOR]>

Use lowercase (it works for all the doctypes) and [B]type[/B]. [I]Language[/I] is deprecated.
Copy linkTweet thisAlerts:
@pakoauthorFeb 07.2008 — Thanks for the reminder Kor.


I didn't know that Language is deprecated.




pako
×

Success!

Help @pako 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,
)...