[thelist] JavaScript with Apache Server

Seth Banks seth at subimage.com
Tue Dec 19 17:35:04 CST 2000


the best way to share javascript across multiple html pages is like this...

in the <HEAD> tag of your documents in which you want to use the js file,
include a line that says

<script src="...(insert real path).../utils.js"
language="JavaScript"></script

Why would you want to include apache in this loop?

- seth

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Monique Gros
Sent: Tuesday, December 19, 2000 1:43 PM
To: thelist at lists.evolt.org
Cc: jtleonard at yahoo.com
Subject: Re: [thelist] JavaScript with Apache Server


A friend of mine is having a problem and I thought someone might be able to
help.

Here's the problem:

Do you by any chance know anything about JavaScript
and the Apache Web Server.  I am trying to create a
shared code file in JS on the server

There are several funcitons I have written that I would like to
use in several web pages.  ie:  is_num, is_empty...
These functions will determine if a string is either
empty or if it contains only numbers.  I am using
these to help in form validations.  Rather than have
copies in each html file I would like to have one
'utils.js' file on the server.
This file would be included by the following:

<script src="$PATH/utils.js"></script>

But I keep gettingthe following error:
[Tue Dec 19 13:15:16 2000] [error] (8)Exec format
error: exec of /var/apache/cgi-bin/utils.js failed
[Tue Dec 19 13:15:16 2000] [error] [client 10.50.1.34]
Premature end of script headers:/var/apache/cgi-bin/utils.js

Any ideas?

~monique


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list