relative linking of files, can I indicate root no matter the level (subdir) ?

P

Peter Van Hove

I sometimes need to go up a few dirs in my html code, like so :
<frame src="../../page_x.html" name="bottomFrame" scrolling="NO" noresize>
depending on what level (subdir) the html is located.

Q. instead of ../../../.. etc.
Is there a character or combination of characters I can use to ALWAYS
indicate the root ?

Like in a Windows DOS box you can do a
cd .. to go one dir higher
or cd \ to go up all the way
 
S

Steve Pugh

Peter said:
I sometimes need to go up a few dirs in my html code, like so :
<frame src="../../page_x.html" name="bottomFrame" scrolling="NO" noresize>
depending on what level (subdir) the html is located.

Q. instead of ../../../.. etc.
Is there a character or combination of characters I can use to ALWAYS
indicate the root ?

Like in a Windows DOS box you can do a
cd .. to go one dir higher
or cd \ to go up all the way

So close...
Apart from the fact that the slashes go in opposite directions DOS
paths and URLs work much the same at a superficial level, so / is the
character you're looking for:
<a href="/">site root from anywhere</a>

Steve
 
P

Peter Van Hove

Thanks !!
I was in fact experimenting with exactly that and it works,
Your reply however is the confirmation that I need.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top