[Javascript] Including Files

Chris Tifer christ at saeweb.com
Mon Nov 24 10:17:55 CST 2003


> 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




More information about the Javascript mailing list