httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Ogston <ogsto...@charter.net>
Subject Re: [users@httpd] Javascript File location
Date Wed, 04 Aug 2004 17:57:01 GMT
Thanks, Tim and Blain, for your answers.  Unfortunately I still can't get 
this to work properly.

When I put code in a module to display the current directory, I get back 
"C:\Program Files\Apache Group\Apache2" as one would expect, since this is 
set in the ServerRoot line of the httpd.conf file.

But if I put QScript.js in this folder, the src="QScript.js" reference does 
not work.

It does work if I put a static html doc in the htdocs directory, and put 
QScript.js in the same directory.

I spent some time this morning putting QScript.js into every subdirectory 
of Apache2, and also in the path up to C:\ and nothing worked when the page 
containing the reference was dynamically generated. It seems as though the 
browser has no valid

I can work around this by including all the functions contained in 
QScript.js directly into the dynamically generated document.  But I am 
curious to know if this is a bug, or a feature, or if I have just not found 
the way to do it right.

Walter


At 02:42 PM 8/3/2004, you wrote:
>It's still just a web page. So the browser will send a request for
>Qscript.js relative to the current URI.
>
>So if that page is generated at /folder/myapp.html, then the browser will
>send a request for /folder/Qscript.js.
>
>Hope that helps,
>
>----- Original Message -----
>From: "Walter Ogston" <ogstoncw@charter.net>
>To: <users@httpd.apache.org>
>Sent: Tuesday, August 03, 2004 2:21 PM
>Subject: [users@httpd] Javascript File location
>
>
> > Dear friends,
> >
> > Please excuse me for asking a newbie question.  I am running Apache 2.0.49
> > under Windows XP, testing with IE 6.0 browser.
> >
> > I have written an apache module that serves up an html document that uses
> > Javascript.  Here is the top of a typical html doc:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>Survey Concepts:  BMH - Golden Triangle 06/03</TITLE>
> > <SCRIPT LANGUAGE="JavaScript" SRC="Qscript.js"></SCRIPT>
> > <SCRIPT LANGUAGE="JavaScript">
> > function setText(aId, aValue) {
> > aId.value = aValue;
> > }
> > </SCRIPT>
> > </HEAD>
> >
> > <BODY onLoad="countQuestions(document.forms[0]);  vAnswersRequired = 1">
> > ... lots of stuff here
> > </BODY>
> > </HTML>
> >
> > Qscript.js contains definitions for countQuestions() etc.  When I save a
> > copy of this doc in the htdocs folder, and also Qscript.js in the same
> > folder, the client-side scripts work correctly.
> >
> > My question is, where do I locate the file Qscript.js so that it can be
> > found by relative address when the calling document is served by a
> > module?  When I load the form generated by the module into the web
>browser,
> > I get an error message like "line 2 character 1 Syntax error", which I
> > interpret to mean that the function countQuestions() cannot be found.  In
> > other words, what is the base for relative addressing when referring to a
> > src= file from a dynamically generated document?
> >
> > I have tried putting QScript.js in the folders httpd, httpd\scripts and
> > \modules, so far without success.
> >
> > TIA
> >
> > Walter
> >
> > /*----------------
> > C. Walter Ogston
> > ogstoncw@charter.net              Kalamazoo, Michigan
> > */
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org

/*----------------
C. Walter Ogston
ogstoncw@charter.net              Kalamazoo, Michigan
*/ 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message