Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting HREF to point to an outside folder

Status
Not open for further replies.

Rena

Programmer
May 24, 2000
69
US
I am trying to figure out how to write up the HREF for a file that is outside the current folder. I need to link to a file that is 1 to 2 folders up. For example
MainFolder
ImagesFolder
BG1.gif
NewsInfoFolder
AboutUsFolder
index.htm
SignsFolder
index.htm

I don't know if this post will keep the indentation but the AboutUsFolder is under the NewsInfoFolder.In the index.htm under AboutUs, I need to access images in the Images folder under the MainFolder and also link to the index.htm under the Signs folder. I have tried using ../ when I need to go up just one level but haven't figured out what works to go up more than one level. Any suggestions?
 
More than one level, just keep doing it, like

../../../myfolder Dean Owen
 
You could also just use an absolute reference like /MainFolder/ImagesFolder/BG1.gif
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thanks to Dean and Tracy for your responses.

I found that Dean's suggestion works great.

Tracy, when I typed in the absolute path like you suggested, it started the path in the folder I was in. For example, I'm in MainFolder/NewsInfo/AboutUs and in the HREF I typed MainFolder/Images/BG1.gif it gave me MainFolder/NewsInfo/AboutUs/MainFolder/Images.
 
Notice tracy had a '/' in her version? That means start from the root directory. In yours, no '/' means start from the current directory. Dean Owen
 
Hi Dean,

Thank you for pointing that out. I had not noticed that before. Now that I do it right it works great.

Rena
 
Correction: "Notice tracy had a '/' in his version?" :) Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Christ! I do apologise!

It was very late for me (nearly midnight here), it's not an excuse, just extenuating circumstances.
Sorry! Dean Owen
 
It's definitely NOT a problem. I just ran into the same thing in another forum too, and it's not the first time here on Tek-Tips. After 45 years I'm more than used to it, sometimes it can even be fun. It certainly doesn't bother me. Don't worry about it. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top