Welcome to TalkGraphics.com
Results 1 to 10 of 10
  1. #1

    Default

    Ok, ya know how to organize files in a web site directory, you put images in an "image" directory for example, and the html tags are something like <img src="images/pic.gif"> or something like this. How can I direct BACK to the previous directory? For example, "blah.html" is in directory "images," and a link from blah.html needs to go to whoa.html, but whoa.html is in the root directory. How do I do this??

    sorry it took so much to explain that.

    -fodo
    IP

  2. #2

    Default

    Ok, ya know how to organize files in a web site directory, you put images in an "image" directory for example, and the html tags are something like <img src="images/pic.gif"> or something like this. How can I direct BACK to the previous directory? For example, "blah.html" is in directory "images," and a link from blah.html needs to go to whoa.html, but whoa.html is in the root directory. How do I do this??

    sorry it took so much to explain that.

    -fodo
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Austria
    Posts
    1,081

    Default

    <a href="../filename.ext">This goes one directory below</a>

    <a href="../folder/filename.ext">This goes one directory below and from THERE into another folder</a>

    "../" goes one directory below, but you may as well stack them.

    If you are in root/images/special and from there you link to "../../file.htm", the file will be taken from "root".

    hth

    Wolfgang
    IP

  4. #4

    Default

    I think I understand. Thanks a lot Wolfgang.
    I'll be back if I can't get it to work. [img]/infopop/emoticons/icon_frown.gif[/img]

    -fodo
    IP

  5. #5

    Default

    I feel dumb cause I can't get this to work. Here's what I have. The main folder is "fodosite". Inside that folder, I have "allreviews" (folder). I want to link from the page "adawarereview.htm" BACK to the file "reviews.htm" that is in the folder "fodosite". I'm not sure why this isn't working. I'm sorry. Can you please help?

    -fodo
    IP

  6. #6
    Join Date
    Aug 2000
    Location
    Austria
    Posts
    1,081

    Default

    Like this:?

    from
    www.whatever.com/fodosite/allreviews/adawarereview.htm

    to
    www.whatever.com/fodosite/reviews.htm


    In "adawarereview.htm" the link must be:
    <a href="../reviews.htm">back to reviews</a>

    "../" brings you one hierarchy up from "allreviews" to "fodosite". "reviews.htm" is the file itself of course.

    If it still does not work, you may give me an online-link and I can check.

    Wolfgang

    P.S.: Don't click on the links, Infopoop don't let me disable HTML. They lead you nowhere ..
    IP

  7. #7

    Default

    [img]/infopop/emoticons/icon_rolleyes.gif[/img] Do these all have to be on a server somewhere to work like this? See, my site isn't actually up yet, I'm just trying to browse around it on my computer. the "../" doesn't seem to be working for me. I'll see what i can do.

    -fodo
    IP

  8. #8
    Join Date
    Aug 2000
    Location
    Austria
    Posts
    1,081

    Default

    ../ is pretty lowtech and should work anyway. Actually I just tried it, just to make sure, and it worked just off the harddisk very well.

    Anyway, it's always better to use a local webserver like Apache PWS or IIS (all free) for testing.

    Remember, the actual link should be "../reviews.htm". No http:// or anything involved !!

    Wolfgang
    IP

  9. #9

    Default

    Well, I ended up just putting the main files all in the same directory, but I'm gonna make a REALLY simple page and test this. I don't know why it's not working. [img]/infopop/emoticons/icon_mad.gif[/img]

    Thank you very much for all your help.

    -fodo
    IP

  10. #10
    Join Date
    Aug 2000
    Location
    Westbank, BC Canada
    Posts
    1,387

    Default

    Hiya...

    Just wanted to ensure fodo that Wolfgang's explanation is correct. Using the ../ method to back out of a directory should work fine even if the files are just on your own comp.

    However...
    Keep this in mind - this method will NOT work from your comp when referrencing the folders/pages/or files starting from the /ROOT directory; i.e. if you use just a slash / and then the folder/page/or file name.

    Like so:

    By just using the forward slash (/) first in a link (and not the double-dots), you tell the browser to hunt for the linked object by starting in the /ROOT directory of the server, and snooping down through the directory structure - unlike the other method which snoops up through the directory structure.

    This method of calling objects only works if your files are actually on a server somewhere; and that would also include any "personal server" you may have instaled on your own comp.

    Just thought i'd mention this method also, for fodo's interest.
    IP

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •