brain fade - how to include one html file in anther?
#1
Let me explain, lets say the header of every page on my site doesn't change, so instead of putting the full code that makes up the header, into every page, I want a reference to 'header.html' in each page instead.
What the heck is the tag name again ?
DOH!
-DV
[Edited by DazV - 5/31/2002 4:51:10 PM]
What the heck is the tag name again ?
DOH!
-DV
[Edited by DazV - 5/31/2002 4:51:10 PM]
#2
Using server side includes is the only way I know of apart from using frames, which are the work of the devil.
SSI depends on your ISP's technology. For ASP it's just <!--#include virtual="filename" -->
Hope this helps.
SSI depends on your ISP's technology. For ASP it's just <!--#include virtual="filename" -->
Hope this helps.
#4
Scooby Regular
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes
on
0 Posts
Might be an easier way, but how about putting the header into a bit of javascript with "document.write" commands and just including it with the <script language="javascript" src="thingy.js">
(p.s. I can't remember the exact syntax for the javascript call, but I have done it before so know it works - have a look on http://javascript.internet.com and you should find an example)
Hope this helps...
Iain
(p.s. I can't remember the exact syntax for the javascript call, but I have done it before so know it works - have a look on http://javascript.internet.com and you should find an example)
Hope this helps...
Iain
#5
Scooby Regular
Daz
You could always use an iFrame tag. Similar to frames, but you dont have to mess about with framesets etc.
You have your main page, say index.html, then place the tags where you want the frame:
<iframe src="content.html" border="0" scroll="auto"></iframe>
etc etc
Works well
DW
You could always use an iFrame tag. Similar to frames, but you dont have to mess about with framesets etc.
You have your main page, say index.html, then place the tags where you want the frame:
<iframe src="content.html" border="0" scroll="auto"></iframe>
etc etc
Works well
DW
Trending Topics
#9
Scooby Regular
iTrader: (1)
Join Date: Jul 1999
Location: Dundee
Posts: 978
Likes: 0
Received 0 Likes
on
0 Posts
dunno if this helps you too, but to create a frames page in a table... sample code..
<TR><TD colSpan=2><IFRAME name=htmlpage=center
src="http://youraddresstofile.htm" frameBorder=0
width="100%" height=130></IFRAME></TD>
<TR><TD colSpan=2><IFRAME name=htmlpage=center
src="http://youraddresstofile.htm" frameBorder=0
width="100%" height=130></IFRAME></TD>
#10
Thanks all, the iframe tag looks good, but I'm trying to follow amazon's blueprint in putting out an e-commerce site thats simple and suitable enough for all browsers so thanks Dreamweaver for the tip-off that iframes won't work in all browsers.
Thanks for the example HOS
I'm going to incorporate some coldfusion so I'll dig out the equialent to chiark's ASP version.
Thanks again all.
-DV
Thanks for the example HOS
I'm going to incorporate some coldfusion so I'll dig out the equialent to chiark's ASP version.
Thanks again all.
-DV
Thread
Thread Starter
Forum
Replies
Last Post
shorty87
Full Cars Breaking For Spares
19
22 December 2015 11:59 AM