Includes files in HTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adam

    Includes files in HTML

    Hi,

    I am having problems having an include file rendered in my browser
    (IE6).

    The include file contains <A href> tags to be used as a navigation bar
    in the footer of a .html file.

    I am using dreamweaver and the included html appears as expected in
    the 'Design View' but does not get rendered in the browser.

    The code I am using looks like this:

    <TD>
    <!--#include file="includes/navbar.html" -->
    </TD>
  • Mark Parnell

    #2
    Re: Includes files in HTML

    Sometime around 20 Nov 2003 18:28:41 -0800, Adam is reported to have
    stated:
    [color=blue]
    > Hi,
    >
    > I am having problems having an include file rendered in my browser
    >[/color]
    <snip>[color=blue]
    >
    > <TD>
    > <!--#include file="includes/navbar.html" -->
    > </TD>[/color]

    Does your host support SSI? Even if they do, the file may need to be
    renamed to navbar.shtml, depending on the server configuration.

    --
    Mark Parnell

    Comment

    • Safalra

      #3
      Re: Includes files in HTML

      areynoldsx@hotm ail.com (Adam) wrote in message news:<a84b035a. 0311201828.51cf 9fda@posting.go ogle.com>...[color=blue]
      > I am having problems having an include file rendered in my browser
      > (IE6).
      > I am using dreamweaver and the included html appears as expected in
      > the 'Design View' but does not get rendered in the browser.[/color]

      Are you viewing this page locally? Because it's the server, not the
      browser, that does the include. (I presume Dreamweaver processes the
      SSI in order to give a proper preview.)

      --- Stephen Morley ---

      Comment

      • William Tasso

        #4
        Re: Includes files in HTML

        Mark Parnell wrote:[color=blue]
        > Sometime around 20 Nov 2003 18:28:41 -0800, Adam is reported to have
        > stated:
        >[color=green]
        >> Hi,
        >>
        >> I am having problems having an include file rendered in my browser
        >>[/color]
        > <snip>[color=green]
        >>
        >> <TD>
        >> <!--#include file="includes/navbar.html" -->
        >> </TD>[/color]
        >
        > Does your host support SSI? Even if they do, the file may need to be
        > renamed to navbar.shtml, depending on the server configuration.[/color]

        Are you sure? It's been a long time since, but ISTR that it's the parent
        that had to have the .shtml extension - in some environments etc ...

        --
        William Tasso - http://WilliamTasso.com


        Comment

        • Mark Parnell

          #5
          Re: Includes files in HTML

          Sometime around Sun, 23 Nov 2003 23:59:49 -0000, William Tasso is reported
          to have stated:[color=blue]
          >
          > Are you sure? It's been a long time since, but ISTR that it's the parent
          > that had to have the .shtml extension - in some environments etc ...[/color]

          I thought I was. :-) But you could be right. It's never been an issue for
          me, so I've never needed to know.

          --
          Mark Parnell

          Comment

          • Brian

            #6
            Re: Includes files in HTML

            Mark Parnell wrote:[color=blue]
            > Sun, 23 Nov 2003 23:59:49 -0000, William Tasso is reported to have
            > stated:
            >[color=green]
            >> ISTR that it's the parent that had to have the .shtml extension -
            >> in some environments etc ...[/color]
            >
            > I thought I was. :-) But you could be right. It's never been an
            > issue for me, so I've never needed to know.[/color]

            The document that contains the ssi directive is the one that matters.
            It is usually the case that the document with the ssi directives must
            have a special extension, often .shtml instead of .html, but one could
            set up a server to look for and process ssi in documents with any
            extension, including .html.

            --
            Brian
            follow the directions in my address to email me

            Comment

            • Mark

              #7
              Re: Includes files in HTML - Additional clarification

              Just a follow-up question. It's been years since I used HTML, but
              it's never too late to get back into the game. Excuse my ignorance on
              the following. I was thinking of using the #include command also to
              eliminate redundant code (ex; navigation bar etc. on multiple pages)
              on a site I am developing and the whole.....makin g sure the server
              option is on is a bit confusing. What if I am using my PC as the
              server? Can I test includes on my PC... Why won;t my includes
              work....Do I need to use the secret password abracadabra??? I'm lost
              on the background here and some fundamentals. Care to elaborate a
              bit?

              Thanks in advance for your clarification.

              Mark.

              Comment

              • Eric Bohlman

                #8
                Re: Includes files in HTML - Additional clarification

                msclayson@comca st.net (Mark) wrote in
                news:6877155a.0 311252123.47e22 f25@posting.goo gle.com:
                [color=blue]
                > Just a follow-up question. It's been years since I used HTML, but
                > it's never too late to get back into the game. Excuse my ignorance on
                > the following. I was thinking of using the #include command also to
                > eliminate redundant code (ex; navigation bar etc. on multiple pages)
                > on a site I am developing and the whole.....makin g sure the server
                > option is on is a bit confusing. What if I am using my PC as the
                > server? Can I test includes on my PC... Why won;t my includes
                > work....Do I need to use the secret password abracadabra??? I'm lost
                > on the background here and some fundamentals. Care to elaborate a
                > bit?[/color]

                In order to use server-side includes on your local PC, you'll have to
                install and use some server software that interprets includes. I'd suggest
                Apache (you can set it up so it doesn't accept requests from anything non-
                local). You can find versions for most any OS.

                Comment

                • Mark Parnell

                  #9
                  Re: Includes files in HTML - Additional clarification

                  Sometime around 25 Nov 2003 21:23:03 -0800, Mark is reported to have
                  stated:
                  [color=blue]
                  > Can I test includes on my PC... Why won;t my includes
                  > work....[/color]

                  You need to have a server (e.g. Apache, IIS) running on your computer.
                  [color=blue]
                  > Do I need to use the secret password abracadabra???[/color]

                  Yes, but that's not the password. ;-)

                  --
                  Mark Parnell

                  Comment

                  • Adam

                    #10
                    Re: Includes files in HTML

                    usenet@safalra. com (Safalra) wrote in message news:<c555467b. 0311210132.7f5b 2b72@posting.go ogle.com>...[color=blue]
                    > areynoldsx@hotm ail.com (Adam) wrote in message news:<a84b035a. 0311201828.51cf 9fda@posting.go ogle.com>...[color=green]
                    > > I am having problems having an include file rendered in my browser
                    > > (IE6).
                    > > I am using dreamweaver and the included html appears as expected in
                    > > the 'Design View' but does not get rendered in the browser.[/color]
                    >
                    > Are you viewing this page locally? Because it's the server, not the
                    > browser, that does the include. (I presume Dreamweaver processes the
                    > SSI in order to give a proper preview.)
                    >
                    > --- Stephen Morley ---
                    > http://www.safalra.com[/color]

                    Renaming the include file to have a *.shtml extenstion didnt help.
                    The page containing the include is a .html and running on IIS.
                    The same include statement works when calling from with a .asp page
                    but not when calling from a .html page.

                    Thanks,
                    Adam

                    Comment

                    Working...