473,378 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Parent Path and Include Files

MDW
I’ve got a menu file that’s saved as an .shtml document. I don’t want to post
the code, but essentially it’s a simple HTML table, with an XSL template
wrapped around it. This way, I can include the file from HTML, ASP, or from
an XML stylesheet.

The actual file inclusion works fine. My problem is that the menu uses
images, which are saved in a different directory than the include file
itself. The overall web structure is this:

webroot/default.asp
webroot/includes/nav.shtml
webroot/images/menu_image.gif
webroot/articles/xml_stylesheet.xsl
webroot/articles/article_subject/article_document.xml

I want to use this same menu on every page of the site, from the default.asp
to each of the article.xml files.

What I can’t figure out is this – the menu uses pictures, which are saved in
the “images” directory. I’m very vaguely familiar with how to use parent
paths to get to the image files, but depending on where the include file is
being used, I might have to do back a different number of levels.

For instance, from the default.asp file, the path would be <img
src=”images/menu_image.gif”>. From the article.xml files, though, the path to
that same image would be <img src=”../../../images/menu_image.gif”> or
something like that.

My question is – is there some way to use an include file that needs parent
paths in multiple places on your web site?

I apologize if the question doesn’t make sense….

--
Hmm...they have the Internet on COMPUTERS now!
Jul 22 '05 #1
2 1604
Code you can use regardless of the asp/htm etc file locations;

<img src="/images/imgSomeImage.gif">

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"MDW" <MD*@discussions.microsoft.com> wrote in message news:43**********************************@microsof t.com...
I’ve got a menu file that’s saved as an .shtml document. I don’t want to post
the code, but essentially it’s a simple HTML table, with an XSL template
wrapped around it. This way, I can include the file from HTML, ASP, or from
an XML stylesheet.

The actual file inclusion works fine. My problem is that the menu uses
images, which are saved in a different directory than the include file
itself. The overall web structure is this:

webroot/default.asp
webroot/includes/nav.shtml
webroot/images/menu_image.gif
webroot/articles/xml_stylesheet.xsl
webroot/articles/article_subject/article_document.xml

I want to use this same menu on every page of the site, from the default.asp
to each of the article.xml files.

What I can’t figure out is this – the menu uses pictures, which are saved in
the “images” directory. I’m very vaguely familiar with how to use parent
paths to get to the image files, but depending on where the include file is
being used, I might have to do back a different number of levels.

For instance, from the default.asp file, the path would be <img
src=”images/menu_image.gif”>. From the article.xml files, though, the path to
that same image would be <img src=”../../../images/menu_image.gif”> or
something like that.

My question is – is there some way to use an include file that needs parent
paths in multiple places on your web site?

I apologize if the question doesn’t make sense….

--
Hmm...they have the Internet on COMPUTERS now!


Jul 22 '05 #2
MDW
Wow, quick reply!

Thanks, I'll give that a try!

"Steven Burn" wrote:
Code you can use regardless of the asp/htm etc file locations;

<img src="/images/imgSomeImage.gif">

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"MDW" <MD*@discussions.microsoft.com> wrote in message news:43**********************************@microsof t.com...
I’ve got a menu file that’s saved as an .shtml document. I don’t want to post
the code, but essentially it’s a simple HTML table, with an XSL template
wrapped around it. This way, I can include the file from HTML, ASP, or from
an XML stylesheet.

The actual file inclusion works fine. My problem is that the menu uses
images, which are saved in a different directory than the include file
itself. The overall web structure is this:

webroot/default.asp
webroot/includes/nav.shtml
webroot/images/menu_image.gif
webroot/articles/xml_stylesheet.xsl
webroot/articles/article_subject/article_document.xml

I want to use this same menu on every page of the site, from the default.asp
to each of the article.xml files.

What I can’t figure out is this – the menu uses pictures, which are saved in
the “images” directory. I’m very vaguely familiar with how to use parent
paths to get to the image files, but depending on where the include file is
being used, I might have to do back a different number of levels.

For instance, from the default.asp file, the path would be <img
src=”images/menu_image.gif”>. From the article.xml files, though, the path to
that same image would be <img src=”../../../images/menu_image.gif”> or
something like that.

My question is – is there some way to use an include file that needs parent
paths in multiple places on your web site?

I apologize if the question doesn’t make sense….

--
Hmm...they have the Internet on COMPUTERS now!


Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: RJ Dake | last post by:
Having problems with uploaded Database and SharePoint sites. At least one of the errors is mentioned below. Sites do not allow access to DB entry or results. Email feedback is MOST appreciated!...
1
by: Hunsal | last post by:
Hi, i have several errors when i want to include a file in my asp codes using "include file" object. i am using windows server 2003 and IIS6. have can i solve this problem? The error...
24
by: Lovely Angel | last post by:
Dear Friends Hope you doing great. I have recently shifted to a webhost which is Using Windows 2003 and IIS 6. Now my application was working fine earlier but now I am facing this problem ...
1
by: Alex VanderWoude | last post by:
I am trying to <include> some text into an XML documentation topic, but that text is stored in a file that is in a different directory than the "current" XML file. Using a relative path does not...
1
by: Hunsal | last post by:
Hi, i have several errors when i want to include a file in my asp codes using "include file" object. i am using windows server 2003 and IIS6. have can i solve this problem? The error...
3
by: Scott | last post by:
I wish to have a link on a page that launches a new browser before it loads the target link. The standard _new and _blank include the parent browser's cookies. Is there an alternative method that...
16
by: Alan Jones | last post by:
Hello everyone, any help would be greatly appreciated. :) What I'm trying to do may not be advisable, but here goes... I want a page named signature.php to appear conditionally as an include...
4
by: davin.pearson | last post by:
Here is my file index.php: <?php include "../parent.php"; ?> When I try to run this code on a Linux server, it gives me the following error message: Warning: main(): open_basedir...
13
by: lawpoop | last post by:
Hello all - I have a two part question. First of all, I have a website under /home/user/www/. The index.php and all the other website pages are under /home/user/www/. For functions that are...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.