Click here to Skip to main content
15,921,577 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Include an HTML File into an another html file. Pin
Pete O'Hanlon11-Oct-10 4:02
mvePete O'Hanlon11-Oct-10 4:02 
AnswerRe: Include an HTML File into an another html file. Pin
cjoki11-Oct-10 4:51
cjoki11-Oct-10 4:51 
The only way I can think to do it outside of something serverside would be to use javascript with a document.write()....maybe this will help http://www.cryer.co.uk/resources/javascript/script4.htm[^]

I would use php to do what you want on the server side of the fence. PHP has a number of related function like include() that I use to seperate my html output into different sections. I do this by making a number of small php files like....

header.php
menu.php
footer.php

these can all contain the basic html output like this example
header.php
-----------
<html>
<head>
<title>My Site</title>
<body>

.....end header.php

AND

menu.php
-------------
<div>
<ul class='menu'>
<li><a href=''>Link 1</a></li>
<li><a href=''>Link 2</a></li>
</ul>
</div>


hope that helps...

AND

footer.php
-------------
</body>
</html>

......end footer.php


NOW you just call these from a page script like this.

index.php
--------------
include('header.php');
include('menu.php');
// start page content....


// end page content....
include('footer.php');
AnswerRe: Include an HTML File into an another html file. Pin
T M Gray21-Oct-10 10:19
T M Gray21-Oct-10 10:19 
QuestionCCS Layout Problem Pin
Patrick Skelton7-Oct-10 23:10
Patrick Skelton7-Oct-10 23:10 
GeneralRe: CCS Layout Problem Pin
crain198116-Oct-10 18:51
crain198116-Oct-10 18:51 
GeneralRe: CCS Layout Problem Pin
Patrick Skelton17-Oct-10 7:55
Patrick Skelton17-Oct-10 7:55 
Questionhelp me out Pin
AkyeaW6-Oct-10 21:33
AkyeaW6-Oct-10 21:33 
AnswerRe: help me out Pin
NeverHeardOfMe6-Oct-10 22:04
NeverHeardOfMe6-Oct-10 22:04 
AnswerRe: help me out Pin
Richard MacCutchan6-Oct-10 22:36
mveRichard MacCutchan6-Oct-10 22:36 
AnswerRe: help me out Pin
Pete O'Hanlon7-Oct-10 0:11
mvePete O'Hanlon7-Oct-10 0:11 
AnswerRe: help me out Pin
cjoki7-Oct-10 5:43
cjoki7-Oct-10 5:43 
AnswerRe: help me out Pin
thatraja7-Oct-10 20:05
professionalthatraja7-Oct-10 20:05 
GeneralRe: help me out Pin
Smithers-Jones11-Oct-10 4:00
Smithers-Jones11-Oct-10 4:00 
QuestionURL rewriting Pin
Poonam Gandash6-Oct-10 2:08
Poonam Gandash6-Oct-10 2:08 
AnswerRe: URL rewriting Pin
Pete O'Hanlon6-Oct-10 2:59
mvePete O'Hanlon6-Oct-10 2:59 
GeneralRe: URL rewriting Pin
Poonam Gandash6-Oct-10 3:07
Poonam Gandash6-Oct-10 3:07 
AnswerRe: URL rewriting Pin
R-tsumami6-Oct-10 3:18
R-tsumami6-Oct-10 3:18 
GeneralRe: URL rewriting Pin
Pete O'Hanlon6-Oct-10 3:41
mvePete O'Hanlon6-Oct-10 3:41 
QuestionTwo panes: Navigation and Content. How to update content within"CSS-Panes" Pin
Frygreen3-Oct-10 6:46
Frygreen3-Oct-10 6:46 
AnswerRe: Two panes: Navigation and Content. How to update content within"CSS-Panes" Pin
Pete O'Hanlon3-Oct-10 9:10
mvePete O'Hanlon3-Oct-10 9:10 
GeneralRe: Two panes: Navigation and Content. How to update content within"CSS-Panes" Pin
Frygreen3-Oct-10 10:10
Frygreen3-Oct-10 10:10 
GeneralRe: Two panes: Navigation and Content. How to update content within"CSS-Panes" Pin
Pete O'Hanlon3-Oct-10 10:55
mvePete O'Hanlon3-Oct-10 10:55 
GeneralRe: Two panes: Navigation and Content. How to update content within"CSS-Panes" Pin
Frygreen4-Oct-10 5:53
Frygreen4-Oct-10 5:53 
GeneralRe: Two panes: Navigation and Content. How to update content within"CSS-Panes" Pin
Pete O'Hanlon4-Oct-10 6:50
mvePete O'Hanlon4-Oct-10 6:50 
QuestionGood book for HTML-Development ? Pin
Frygreen2-Oct-10 7:14
Frygreen2-Oct-10 7:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.