HTML Include command?

Discussion in 'HTML' started by Aaron Reimann, Oct 12, 2005.

  1. To my knowledge, there isn't a way to do it without stuff like iframe
    and what not. Does your hosting provide PHP support? If so:

    <?php include("page2.php"); ?>
     
    Aaron Reimann, Oct 12, 2005
    #1
    1. Advertising

  2. Aaron Reimann

    Brian Cryer Guest

    "Jackmac" <> wrote in message
    news:dijafo$9ba$...
    > Hi all,
    >
    > Hopefully a simple solution to this problem.
    >
    > I want to use some common elements in my web pages but want to store them
    > centrally so I only need to change one file instead of multiple.
    >
    > I use it in programming just now so am sure it can be done.
    >
    > I have say a file page1.html which is standard text, and I wwant to
    > include the information on page2.html in the middle section. Is there a
    > way I can say:
    >
    > Call or Include page2.html
    >
    > If I strip out all the head and body tags, surely I should be able to put
    > this in?
    >
    > Anyone any ideas?
    >
    > TIA
    >
    > Jackmac


    There isn't an html include. (I wish there was!)

    See if your server supports server side includes, I think that might give
    you what you are after (but I've not used them, so could be wrong).

    An alternative would be to use JavaScript, to generate the common content.
    The trouble with this is that you can't rely on everyone having JavaScript
    enabled.

    Hope this helps.
    --
    Brian Cryer
    www.cryer.co.uk/brian
     
    Brian Cryer, Oct 12, 2005
    #2
    1. Advertising

  3. Jackmac wrote:

    > I want to use some common elements in my web pages but want to store them
    > centrally so I only need to change one file instead of multiple.


    http://www.allmyfaqs.com/faq.pl?Include_one_file_in_another

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Oct 12, 2005
    #3
  4. Aaron Reimann

    wd Guest

    On Thu, 13 Oct 2005 16:35:18 +0100, Jackmac wrote:

    > Hi all,
    >
    > Hopefully a simple solution to this problem.
    >
    > I want to use some common elements in my web pages but want to store them
    > centrally so I only need to change one file instead of multiple.
    >
    > I use it in programming just now so am sure it can be done.
    >
    > I have say a file page1.html which is standard text, and I wwant to include
    > the information on page2.html in the middle section. Is there a way I can
    > say:
    >
    > Call or Include page2.html
    >
    > If I strip out all the head and body tags, surely I should be able to put
    > this in?
    >
    > Anyone any ideas?


    The easiest way is with PHP:
    http://tips.webdesign10.com/index.php?p=php-mysql-resources

    You can use the "include" statement.
     
    wd, Oct 13, 2005
    #4
  5. Aaron Reimann

    Jackmac Guest

    Hi all,

    Hopefully a simple solution to this problem.

    I want to use some common elements in my web pages but want to store them
    centrally so I only need to change one file instead of multiple.

    I use it in programming just now so am sure it can be done.

    I have say a file page1.html which is standard text, and I wwant to include
    the information on page2.html in the middle section. Is there a way I can
    say:

    Call or Include page2.html

    If I strip out all the head and body tags, surely I should be able to put
    this in?

    Anyone any ideas?

    TIA

    Jackmac
     
    Jackmac, Oct 13, 2005
    #5
    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. Kevin

    include HTML code from html page

    Kevin, Sep 27, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    775
    Siva M
    Sep 27, 2005
  2. Cloud Burst
    Replies:
    11
    Views:
    1,136
  3. Tom
    Replies:
    8
    Views:
    739
    Adrienne Boswell
    Feb 13, 2007
  4. Dale
    Replies:
    3
    Views:
    5,760
  5. Andreas Bogenberger
    Replies:
    3
    Views:
    1,015
    Andreas Bogenberger
    Feb 22, 2008
Loading...

Share This Page