SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member
    Join Date
    Jun 2001
    Location
    Bangkok, Thailand
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Files with SSI perfect when viewed individually, but messed up if clicked from links.

    I am using DW4 to make my web pages. One nice thing about it is that it simulates a server and I can thus check out all my SSI includes (I'm a newbie at anything newer than cold, hand-written HTML :P ).

    Now, my .shtml files appear perfectly when I preview them in my browser. However, when I click on a link in one .shtml file to get to .shtml file #2, file #2 will come up with absolutely nothing _but_ the text, as if I hadn't placed tables, etc. in the code.

    The thing is, if I look at each page individually, they ALL look as they are supposed to. When I try to get to the pages by clicking a link -- now that's where the trouble starts.

    Can someone enlighten me about why they look fine if I individually preview them but get messed up when I click their link? (They come up as normal html files with no formatting... they're just a block of text running from one side of the browser to another, when in actuality I have 3 tables on the page and the text is supposed to be in a table in the middle, with the navigation on the left and favorite off-site links and quotes on the right.)

    Please help. I searched practically every darn SSI thread and I don't think anyone ever mentioned this type of problem.
    Last edited by mallika723; Jun 23, 2001 at 02:10.
    Mallika

  2. #2
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds bizarre. I don't suppose you have the files uploaded already? Probably would be much easier to solve if we could take a look, unless if somebody has encountered the exact same problem.

  3. #3
    SitePoint Zealot honging's Avatar
    Join Date
    Jan 2001
    Location
    Chapel Hill, NC
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you use SSI, you must remember folders!

    So, for instance, if you are in

    www.domain.com/folder/
    and you have a SSI trying to call <!--#include virtual="something.shtml"-->
    it will search
    www.domain.com/folder/something.shtml, while you may have it at www.domain.com/something.shtml.

    If you have your own domain, i suggest you use <!--#include virtual="/something.shtml"--> and keep the something.shtml in your root.

    Also remember that the images must be set to the correct location.

    My guess is that you have different folders, and you're not setting the path settings for the includes correctly

  4. #4
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup that makes sense. Root relative as suggested by honging is the best way to go.

  5. #5
    SitePoint Member
    Join Date
    Jun 2001
    Location
    Bangkok, Thailand
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All files are in the same directory, meaning there is no source problem. Another thing that's really strange is that, like I said, they look perfect when I preview them individually. See, every page has a navigation menu at the left (a list of links). It's when I try to get to another page by clicking a link from the current page I'm previewing that I get the nonformatted-text-problem I mentioned.

    And no, I'm sorry that I don't have them online because I'm researching hosts left and right and haven't really decided yet.

    So no one has encountered anything like this? Would it be easier if I posted the source code? (How _do_ you post source code anyway? Some boards will automatically turn the code "on" -- if you know what I mean -- and I'm not sure what this board will do. I don't want to mess things up.)

    Thanks.
    Mallika

  6. #6
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have the files on your computer and are just looking at them in your browser you will just see the ssi tags because they are not being passed. Try uploading them and everything should work fine as they will be passed through the webserver before they are sent to the browser.

    Sean

  7. #7
    SitePoint Zealot honging's Avatar
    Join Date
    Jan 2001
    Location
    Chapel Hill, NC
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This may sound really basic, but you *do* have the SSI tags on all the other pages as well, right?

  8. #8
    SitePoint Member
    Join Date
    Jun 2001
    Location
    Bangkok, Thailand
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, I have the SSI tags on all the other pages (how could they come up perfectly any other way? ). And since I use DW4, it "simulates" a server, thereby letting me see how it'll look. Or is it that it's not the same and the problem would go away once I upload to a REAL server?

    Oh well. Thanks you guys.
    Mallika

  9. #9
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Naw, it's just the way DW "simulates" the server. When opening subsequent files I don't think it calls the engine properly (I've experienced it too) as along as you're sure the code is fine (open pages individually) they WILL be fine when you upload.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  10. #10
    Procrastinator Extraordinaire lucas's Avatar
    Join Date
    Oct 2000
    Location
    Springfield, Missouri, U.S.A.
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by studiococo
    Naw, it's just the way DW "simulates" the server. When opening subsequent files I don't think it calls the engine properly (I've experienced it too) as along as you're sure the code is fine (open pages individually) they WILL be fine when you upload.
    yup. dw isn't a server program, it only lets you preview the current document your editing. it will not process ssi when you click a subsequent link.

  11. #11
    SitePoint Member
    Join Date
    Jun 2001
    Location
    Bangkok, Thailand
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *enthusiastically* Thankyouthankyouthankyouthankyou THANK YOU so much for clearing that up and assuring me!
    Mallika


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
  •