Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Including header file using HTML

    Is it possible to include a header and footer file using HTML? I have my file as a .html and need to be able to include the HTML for the header and footer. Anyone know how I can do this?

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    You can use an Iframe (Inline Frame). http://www.designplace.org/tutorials.php?page=1&c_id=1

  • #3
    Regular Coder BWiz's Avatar
    Join Date
    Mar 2006
    Location
    Sol System
    Posts
    471
    Thanks
    7
    Thanked 21 Times in 21 Posts
    I'm guessing you're meaning something like the PHP include function?

    PHP Code:
    <?php include("extensions/footer.php"); ?>
    If you can use serverside languages, use them much for efficient. However, if you are restricted iFrames would be the way to go, however they aren't recommended. A JavaScript solution is listed on this page: http://www.boutell.com/newfaq/creating/include.html
    Last edited by BWiz; 07-07-2007 at 10:48 PM.
    BWiz :: Happy Coding!
    2006
    2007 2008 2009
    2010 2011
    Irrational numbers make no sense.


  •  

    Posting Permissions

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