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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relative referencing 1

Status
Not open for further replies.

starfishh

Programmer
Mar 23, 2001
20
GB
Hi All,

A quick query.

How can I reference a page relatively, that is in a folder higher in the hierarchy ?

e.g In page1, I want to make a link to page2 using an <a> tag. However page2 is in a folder above page1.

foldera contains: page2 & folderb

folderb contains: page1

This is just an example. The site I am working on is not yet live and so absolute referencing would be in the form:

C:/foldera/page2

I'd rather reference relatively to avoid problems when going live. This problem is applying to stylesheets and images as well. Is there anyway of refernecing these relatively when they are not in the same folder as the page or a folder within the same folder?

Sorry if this is a bit confusing.

starfishh


 
<a href=&quot;../page2&quot;>This link would go in page 1</a>

I think that's what you're looking for...
 
Thanks aperfectcircle

thats just what im looking for.

its so frustrating when you can see there must be a way to do something but just dont know how.

Cheers! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top