httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Burden" <...@burden.ca>
Subject Re: [users@httpd] Javascript File location
Date Tue, 03 Aug 2004 18:42:00 GMT
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


Mime
View raw message