[thelist] JavaScript included file question

Nan Harbison nansmith at heritageconcord.org
Thu Aug 28 07:02:54 CDT 2003


Gurus,
I am looking at a web application, which I did not create,
I am just giving my opinion on this mess. The index page
calls a file called javascript.inc. This is all that is in
this file (watch the wrap):

<script language="JavaScript"
src="<?=(($incJavaScript)?$incJavaScript:STR_GLOBAL_JAVASC
RIPT)?>"></script>

This application uses PHP (obviously) and PEAR, and there
is only one other include statement on this page, which is
to a CSS file. There is another file on this site that has
the statement:
$incJavaScript = STR_GLOBAL_JAVASCRIPT;

and a global setting page has this:
define("STR_GLOBAL_JAVASCRIPT",
WS_PATH.'include/global_javascript.js');

Can someone tell me what the point of this is? It seems
like a rather round-about way to call an included file.

TIA,
Nan




More information about the thelist mailing list