<!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>&nbsp;</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>&quot;The client will change their minds. Its not because they are lower forms of life, they just are never clear on what they want.&quot; </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>&gt; OK, I have a page link in an include file, &quot;/dir1/dir2/page1.asp&quot;.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; The include file is in a page at &quot;/dir1/dir3/page2.asp&quot;.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; The include file is at &quot;/include/inc_menu_bar.asp&quot;.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; When I click the link, where does it 'think' it is?&nbsp; My testing has </FONT>
<BR><FONT SIZE=2>&gt; left me somewhat more befuddled than usual.&nbsp; What I need is to have </FONT>
<BR><FONT SIZE=2>&gt; the include file produce the called page regarless of where it is when </FONT>
<BR><FONT SIZE=2>&gt; the link is clicked.&nbsp; I can do it by using &quot;<A HREF="http://" TARGET="_blank">http://</A> . . .&quot;, but I'd </FONT>
<BR><FONT SIZE=2>&gt; like to avoid that because of development issues.&nbsp; I don't want to </FONT>
<BR><FONT SIZE=2>&gt; have to rewrite all the links in order to move the pages to </FONT>
<BR><FONT SIZE=2>&gt; production.</FONT>
</P>
<BR>

<P><FONT SIZE=2>To the browser, there is no such thing as an include. Once the server &quot;includes&quot; 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 &quot;/dir1/dir2/page1.asp&quot; on the page of &quot;/dir1/dir3/page2.asp&quot; 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>