<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2652.35">
<TITLE>RE: [Javascript] Includes and relative paths?</TITLE>
</HEAD>
<BODY>
<BR>
<P><FONT SIZE=2>Easy way to sum it up</FONT>
</P>
<P><FONT SIZE=2>It's a 'Server Side' Include.</FONT>
<BR><FONT SIZE=2> </FONT>
</P>
<P><FONT SIZE=2>__________________________________________</FONT>
</P>
<P><FONT SIZE=2>Phil Winstanley</FONT>
<BR><FONT SIZE=2>Software Creations (Holdings) Ltd</FONT>
</P>
<P><FONT SIZE=2>"The client will change their minds. Its not because they are lower forms of life, they just are never clear on what they want." </FONT></P>
<P><FONT SIZE=2>___________________________________________</FONT>
<BR><FONT SIZE=2>ICQ: 29163700</FONT>
<BR><FONT SIZE=2><A HREF="http://www.creations.co.uk/" TARGET="_blank">http://www.creations.co.uk/</A></FONT>
<BR><FONT SIZE=2>phil.winstanley@creations.co.uk</FONT>
</P>
<BR>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Ben Curtis [<A HREF="mailto:Quixote@LaMancha.org">mailto:Quixote@LaMancha.org</A>] </FONT>
<BR><FONT SIZE=2>Sent: Tuesday, July 03, 2001 5:24 PM</FONT>
<BR><FONT SIZE=2>To: javascript@latech.edu</FONT>
<BR><FONT SIZE=2>Subject: Re: [Javascript] Includes and relative paths?</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>> OK, I have a page link in an include file, "/dir1/dir2/page1.asp".</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> The include file is in a page at "/dir1/dir3/page2.asp".</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> The include file is at "/include/inc_menu_bar.asp".</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> When I click the link, where does it 'think' it is? My testing has </FONT>
<BR><FONT SIZE=2>> left me somewhat more befuddled than usual. What I need is to have </FONT>
<BR><FONT SIZE=2>> the include file produce the called page regarless of where it is when </FONT>
<BR><FONT SIZE=2>> the link is clicked. I can do it by using "<A HREF="http://" TARGET="_blank">http://</A> . . .", but I'd </FONT>
<BR><FONT SIZE=2>> like to avoid that because of development issues. I don't want to </FONT>
<BR><FONT SIZE=2>> have to rewrite all the links in order to move the pages to </FONT>
<BR><FONT SIZE=2>> production.</FONT>
</P>
<BR>
<P><FONT SIZE=2>To the browser, there is no such thing as an include. Once the server "includes" the file, the browser only sees plain HTML -- and can't tell the difference between HTML that was completely coded as-is or HTML that was assembled from code fragments.</FONT></P>
<P><FONT SIZE=2>Thus, your browser will react to the link to "/dir1/dir2/page1.asp" on the page of "/dir1/dir3/page2.asp" as if you simply coded that link onto that page. The include is confusing you. Let it go... :)</FONT></P>
<P><FONT SIZE=2>+Ben Curtis</FONT>
<BR><FONT SIZE=2>...just this guy, you know?</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Javascript mailing list</FONT>
<BR><FONT SIZE=2>Javascript@LaTech.edu <A HREF="http://www.LaTech.edu/mailman/listinfo/javascript" TARGET="_blank">http://www.LaTech.edu/mailman/listinfo/javascript</A></FONT>
</P>
</BODY>
</HTML>