/    Sign up×
Community /Pin to ProfileBookmark

Using Javascript library with Personal Web Seerver

I am developing an application on my home computer using windows personal webserver.
I am attempting to use javascript library files *.js referencing them from my html files. It only works when the *.js file is physically in the same directory as the html file. Thus, I know the lines I’ve written in the html file work, but I want it to work while having the Javascript library files in the javascript directory.

[B][COLOR=”Sienna”]Please, what can I do to make this work?[/COLOR][/B]

I have a directory structure in my wwwroot:

wwwrootjavascript*.js
wwwroothighScoreE460*.html

The lines in the HTML file look something like this:
<SCRIPT LANGUAGE=’Javascript’ SRC=’http://localhost/Javascript/Append.js’></SCRIPT>

<Script LANGUAGE=”Javascript”>
[INDENT][/INDENT]var x=append();
</SCRIPT>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@toicontienApr 16.2008 — Try using a relative URL.
http://localhost/Javascript/Append.js
Becomes
/Javascript/Append.js
×

Success!

Help @Donna_JSD 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 5.27,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...