anarchist
08-07-2003, 06:39 AM
I work on a web based applicatication, and our files are all shared and run locally then uploaded to a central server when we make our changes, the problem we have is that one of the variables we save in our scripts is the ip address of the server the files are run from in my case my local machine, in the case of the other members of the team its thier local machine, obviously this is a local setting rather than an overall system setting (we currently use localhost on our development machines for simplicity, but we have the office system which runs on a central server so needs a different address)
what I'm wondering is, is there any way of including a javascript file from within a javascript file, so on each page we have
<script src="navigate.js">
and within the navigate script is a call to read the contents of say localsettings.js
if anyone can help it will save us a major annoyance as everytime we update the server everyone gets booted becaus the ip address changes
I know we can quite easily add extra <script src=""> tags to each page but theres well over 100 pages that would need changing making it a major task to fix a 2min problem
what I'm wondering is, is there any way of including a javascript file from within a javascript file, so on each page we have
<script src="navigate.js">
and within the navigate script is a call to read the contents of say localsettings.js
if anyone can help it will save us a major annoyance as everytime we update the server everyone gets booted becaus the ip address changes
I know we can quite easily add extra <script src=""> tags to each page but theres well over 100 pages that would need changing making it a major task to fix a 2min problem