[Javascript] Including Files

David Lovering dlovering at gazos.com
Mon Nov 24 13:10:34 CST 2003


I concur with Chris Tifer's suggestion.  Unfortunately, when one is dealing
with CASE web-design tools (most notably by Micro$oft and MacroMedia), the
various elements making up a page or system of pages often get smeared over
several directories.  When one is writing for such an environment, it is
often helpful to use "relative" directory structures to keep track of things
relative to the "parent" directory which the CASE application regards as
"home".  Ugh!

As I steadfastly refuse to use CASE web-design tools (thereby greatly
limiting my employment), I use a strict path to all my various supported
directories, files, etc.  I don't get paid much or often, but I do have
fairly secure sites.

In all fairness, putting all ten billion widgets and do-hickies in the same
directory may not only contribute to clutter, but may involve some unwelcome
duplication between different applications.  Also, some elements may be
"general purpose" (file-folder icons, button outlines, etc.), while others
may be functional code whose use and access are highly restricted.  Putting
these all together somewhat complicates the necessary security methodologies
required to protect them appropriately.

-- Dave Lovering

----- Original Message ----- 
From: "Chris Tifer" <christ at saeweb.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Monday, November 24, 2003 9:17 AM
Subject: Re: [Javascript] Including Files


> > Because most of the implementations of JavaScript that I'm familiar with
> > don't let you backtrack directories (via the SRC="../../my_page.js"
> method),
> > you generally find it more convenient to put your primary script at the
> top
> > of a descending directory tree, and your "custom" stuff in descending
> > directories beneath it.  For example,
>
> Why not just use paths from the root instead of trying to do ../../ or
> anything like that. Structured websites are the key. Store all of your
> include in one directory, and NO MATTER where you include that from, it
will
> find it. Using relative paths is NOT recommended in any scenario.
>
> Chris Tifer
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>





More information about the Javascript mailing list