Link to home
Start Free TrialLog in
Avatar of Elizabeth Baker
Elizabeth Baker

asked on

How to reference external javascript file on apache server


Alas, our coder has disappeared into the wilds of the Northwest somewhere! We don't really know javascript and are learning it on the fly.

We have an external javascript file on our website, but the html files don't seem to be referencing it. The website is hosted on a godaddy Apache server with a dedicated IP with  shared hosting  and running Linux.

The javascript file is in a subfolder "cgi-biin" of our website on the server. How do we set up a relative path to the javascript file on the Apache server--i.e., how do we reference the root of OUR website on the server?

For example, if our directory structure on the server is
      [server stuff]/our website root directory/cgi-bin/foldercheck/javascript.js
how would we reference javascript.js in the htm files?

And, as an aside, which is the better format for javascript files--js or txt?

Thanks so much. We really appreciate the help.

We hope your holidays have been good and continue so. We send you our best wishes.

--elizabeth
ASKER CERTIFIED SOLUTION
Avatar of Insoftservice inso
Insoftservice inso
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Elizabeth Baker
Elizabeth Baker

ASKER

Worked! Thanks so much.
--elizabeth