puzzling filepath problem

liunx

Guest
Hi guys.<br />
I'm having a rather interesting problem with some graphic images being unable to be displayed on certain pages of my site. On most pages, everything's fine. On a few pages however, some of my images won't display properly.<br />
The reason for this is that IE is looking in the wrong sub folder for these images but I don't know how to fix this. Basically what's happening is I have this html page in a subfolder with a filepath of "index/tsb/errorpage.html". I call an html file(this file is called on the top of every page on my site. It's my nav bar file.) The way I call it is:<br />
<!--#include file="../../NavBar/top_content.html"--><br />
This apparently works successfully. The next step however is where I run into my problem. From my top_content.html file, I call for the folder containing the images needed for the top_content.html file. This file is stored out on the main directory in "images/navbarimages/", therefore that should be the filepath it goes to. Unfortunately, it ends up going to "index/images/navbarimages" but there is no such filepath so I get an error. Most other pages on my site work fine (although all other hrml files are stored in only 1 folder, not an additional sub folder as is in this case). If you'd like to see the problem, check out these two links. 1st link is a working page. 2nd link does not work:<br />
<!-- m --><a class="postlink" href="http://208.20.14.9/index.asp">http://208.20.14.9/index.asp</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://208.20.14.9/indexed/tsb/indexem.asp">http://208.20.14.9/indexed/tsb/indexem.asp</a><!-- m --><br />
If anyone can provide some solutions I may try, I would greatly appreciate it as I am moments away from pulling my hair out with this one. Thanks in advance.<br />
-Goalie35<!--content-->You are having problems because it appears you are calling the images up in an url relative to the include. The url has to be written relative to the doc containing the include not the other way round.<br />
<br />
Once the include is in the target html page the url's have to be relative that. Does that make sense? I hope it does. If not let me know.<!--content-->Ps the best thing to fix the problem especially if you are using includes and a complicated dir structure is to write the full urls of any anchors or image src's i.e.<br />
<br />
<img src=http://www.htmlforums.com/archive/index.php/"http://www.my.com/images/image.jpg"><br />
<br />
That way no matter where the doc resides it will always find the images or link.<!--content-->
 
Back
Top