[Javascript] Includes and relative paths? -- followup
Rees, Mark (TWIi London)
mrees at twii.net
Tue Jul 3 06:01:09 CDT 2001
Hello
Are you talking about the #include directive? if so, you can either write
#include virtual="/ path from web root"
e.g.
#include virtual="/includes/homepage/menu.htm"
or miss off the first slash and you have relative paths i.e. the statement
below only works if you are in the root.
#include virtual="includes/homepage/menu.htm"
You can do all this kind of business as well if you must:
#include virtual="../includes/homepage/menu.htm"
#include file only refers to files located in the same directory as the page
the include directive is on, e.g.
#include file="menu.htm"
Do yourself a favour and do it like #include
virtual="/includes/homepage/menu.htm" - this will save you the trouble of
working out the path if you ever need to call the include from another page.
I hope this helps
Mark
-----Original Message-----
From: databarn [mailto:databarn at airmail.net]
Sent: 03 July 2001 06:18
To: javascript at LaTech.edu
Subject: Re: [Javascript] Includes and relative paths? -- followup
OK,
I've confirmed (I think) that path is not relative to the web root. Now I
need to find out if it has a codified path property at all. <Gee whiz,
batman! I don' wanna be a coder.>
Make a good day . . .
. . . barn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The desire to have things done quickly Invariably prevents them from being
done thoroughly.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________
From: databarn [databarn at airmail.net]
To: javascript at LaTech.edu
Subject: [Javascript] Includes and relative paths?
Time: 7/2/2001 at 11:56PM
Folk,
Anybody know where I can find some documentation on the way
JavaScript/JScript treats path information?
I _think_ that it uses path relative to the root web, but I can't find
anything that says yea or nay.
I'm using include files to create a menu bar on a number of pages in a
number of different directories on the server. Everything seems to work,
but I can't find confirmation that what's being done is being done right.
Been bitten before by "it works" and empirical methodology, so I'd kinda
like to get some documentation before pointing a finger at a browser type.
(And I don't seem to be smart enough to create a search list that's small
enough to read - everything keeps coming up with multi-thousand hits
<sigh!>.)
Make a good day . . .
. . . barn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If your not living life on the edge, your wasting space.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list