[Javascript] Includes and relative paths?

Peter Brunone peter at brunone.com
Tue Jul 3 11:23:42 CDT 2001


Barn,

    This doesn't really sound like a Javascript question.  You might be
better off asking this sort of thing on one of the many ASP lists at
AspLists.com (http://asplists.com/asplists/aspfreeforall.asp comes to mind).

    For what it's worth, include files are processed before anything else
happens, and the code in an include is treated exactly the same as the
surrounding code.  Basically what this means is that if the include file
just says <A HREF="page2.asp">, then the link will work as specified.

Cheers,

Peter

----- Original Message -----
From: "databarn" <databarn at airmail.net>
To: <javascript at LaTech.edu>
Sent: Tuesday, July 03, 2001 11:08 AM
Subject: Re: [Javascript] Includes and relative paths?


I didn't make myself clear.  Kinda brain-dead at the time (or most of the
time).

OK, I have a page link in an include file, "/dir1/dir2/page1.asp".

The include file is in a page at "/dir1/dir3/page2.asp".

The include file is at "/include/inc_menu_bar.asp".

When I click the link, where does it 'think' it is?  My testing has left me
somewhat more befuddled than usual.  What I need is to have the include file
produce the called page regarless of where it is when the link is clicked.
I can do it by using "http:// . . .", but I'd like to avoid that because of
development issues.  I don't want to have to rewrite all the links in order
to move the pages to production.

Make a good day . . .
. . . barn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Adult: A person who has stopped growing at both ends and is now growing in
the middle.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________
From: Hassan Schroeder [hassan at webtuitive.com]
To: javascript at LaTech.edu
Subject: Re: [Javascript] Includes and relative paths?
Time: 7/3/2001 at 9:31AM

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript






More information about the Javascript mailing list