?
Solved

how do i include header and footer as include in html file

Posted on 2005-03-28
14
Medium Priority
?
310 Views
Last Modified: 2013-11-18
I am creattting an html prototype for a web application

I need to add header and footer as an include file rather than repeat the code on each page

how do I enter the header and foooter as include file


Thankyou for alur help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0
Comment
Question by:royalcyber
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +3
14 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 13646860
This should give you what you need:

http://bignosebird.com/ssi.shtml

Cd&
0
 
LVL 6

Expert Comment

by:superm401
ID: 13647117
Do you have access to server-side scripting or SSI?
0
 

Author Comment

by:royalcyber
ID: 13647291
I am not sure ; I am using IIS6.0 for my webserver
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 13647367
If you are using ASP ass the scripting language, it has functionality for includes, as does PHP.

You are going to have tell us more about your environment and capabilites for us to give you much detail.  Right now we are at an extremely general level in terms of what may be possible.

Cd&
0
 

Author Comment

by:royalcyber
ID: 13647596
i can only use html for my prototype of a web application

can i have includes in html for the header and footer so if they change anything in header/footer i dont have to change it in al lthe 50 pages of the prototype


0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 2000 total points
ID: 13647761
If you do not have server side capabilites then includes are out of the question.

The other possibility is to generate on the client using javascript document.write()s to produce the elements as load time.

Cd&
0
 
LVL 23

Expert Comment

by:sciwriter
ID: 13649033
<<  I am creattting an html prototype for a web application >>

You should definitely consider PHP then, this is SO EASY to do in PHP.

either in CSS or in a table, whichever you prefer -- I'll use table here because it is shorter to present

<TABLE width=800>
   <TBODY>
   <TR>
      <TD width=790> <?php include ("header.php")  ?> </TD>
   </TR>
   <TR>
       <TD width=200><?php include ("left_nav.php")  ?> </TD>
       <TD width=400><?php include ("lintro.php")  ?> </TD>
       <TD width=200><?php include ("right_links.php")  ?> </TD>
     </TR>
      <TR>
         <TD width=800><?php include ("footer.php")  ?></TD>
       </TR>
     </TBODY>
  </TABLE>

This is a simple example, obviously and not what you might have in mind with CSS -- but in merely shows the great simplicity with which you can include these files with PHP.  Each include file can include its own HTML formatting, active PHP server code, or whatever you desire.  

It's hard to find a simpler alternative, I have tried, and if all you want to do is include, I think this beats the rest.
 
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 13649340
A wonderful solution... one of the possibilities as I already mentioned; but I think " I can only use html for my prototype of a web application" probably means a client side solution is required. Let's hope JS is okay otherwise there is no solution.

Cd&


0
 
LVL 23

Expert Comment

by:sciwriter
ID: 13649414
I agree, and you/we should expand on that -- it is not at all obvious to many people that --

1.  JS is a bad solution if you want to index your site with search engines
2.  There is no easy way to do this with straight HTML, without using IFRAMES
3.  Essentially everything else is server based -- either ASP, JAVA, PHP -- or even SSI.

Your topic -- explain to this Qer the limits, as you see it -- this is an important conceptual hurdle that is not at all obvious to most people, and any comments from top experts on the issue, I'm sure would be most welcome.....
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 13649497
The issue of whether to use JS is moot unless their is an indication of interest in exploring it.  Let's first see it the option is available.  It is a last resort type of solution that I am not fond of.

Cd&
0
 
LVL 2

Expert Comment

by:Grins
ID: 13680766
Would there be a way to make xml data islands work in this case?
0
 
LVL 6

Expert Comment

by:cjinsocal581
ID: 13757399
Are you thinking something like this:

<!--#include file="ReportDataIO.asp" -->
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question