473,796 Members | 2,586 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_documen t.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 1628
Code you can use regardless of the asp/htm etc file locations;

<img src="/images/imgSomeImage.gi f">

--
Regards

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

Keeping it FREE!

"MDW" <MD*@discussion s.microsoft.com > wrote in message news:43******** *************** ***********@mic rosoft.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_documen t.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.gi f">

--
Regards

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

Keeping it FREE!

"MDW" <MD*@discussion s.microsoft.com > wrote in message news:43******** *************** ***********@mic rosoft.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_documen t.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
6988
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! Thanks, RJ Error message is as follows:
1
1694
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 description is like this.... Active Server Pages error 'ASP 0131' Disallowed Parent Path
24
7431
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 Server.MapPath() error 'ASP 0175 : 80004005' Disallowed Path Characters /backend/_add_two.asp, line 103
1
3313
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 appear to work, because the base being used is the Common7\IDE directory, not my original source directory. Here is the situation: MyApp directory contains the file Form1.cs, Form1.xml, and Generic.xml. There is also a subdirectory called...
1
1820
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 description is like this.... Active Server Pages error 'ASP 0131' Disallowed Parent Path
3
2028
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 excludes these cookies? Thanks in advance
16
3748
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 within another include so that it will, for example, appear in index.php but not in other result pages that use the same top level include. The method would need to determine what page it is inside of
4
9264
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 restriction in effect. File(../
13
2817
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 used in multiple files, I have php files under / home/user/www/functions/. These files simply have So, in index.php and other files, I have
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9535
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10465
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10242
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5453
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.