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

Discussion in 'HTML' started by Peter Van Hove, Apr 22, 2005.

  1. 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
    Peter Van Hove, Apr 22, 2005
    #1
    1. Advertising

  2. PS. I'm looking for something relative, no hard coded URL.

    -------------------------------------------------------
    "Peter Van Hove" <> wrote
    in message news:Ic6ae.71100$-ops.be...
    >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
    >
    Peter Van Hove, Apr 22, 2005
    #2
    1. Advertising

  3. Peter Van Hove

    Steve Pugh Guest

    Peter Van Hove wrote:
    > 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
    Steve Pugh, Apr 22, 2005
    #3
  4. Thanks !!
    I was in fact experimenting with exactly that and it works,
    Your reply however is the confirmation that I need.

    >
    > 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
    >
    Peter Van Hove, Apr 22, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9obiBCYWlsZXk=?=

    Can you still indicate to distribute files locally in ASP.Net 2.0

    =?Utf-8?B?Sm9obiBCYWlsZXk=?=, Jun 16, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    352
    =?Utf-8?B?Sm9obiBCYWlsZXk=?=
    Jun 16, 2005
  2. news-server

    View a list of files in a SubDir

    news-server, Jul 11, 2003, in forum: HTML
    Replies:
    1
    Views:
    418
    David Dorward
    Jul 11, 2003
  3. hilz
    Replies:
    1
    Views:
    504
    Richard Tobin
    Jan 18, 2006
  4. pabbu
    Replies:
    8
    Views:
    707
    Marc Boyer
    Nov 7, 2005
  5. Ed
    Replies:
    4
    Views:
    146
    joker
    Aug 4, 2004
Loading...

Share This Page