?
Solved

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

Posted on 2005-03-28
14
Medium Priority
?
311 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
  • 5
  • 2
  • 2
  • +3
12 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
Independent Software Vendors: 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

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

571 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