View Full Version : embeding HTML into and HTML file
hinch1
12-17-2002, 11:41 PM
Okay I have a probem. I'm building a webpage and I have a navigation section that I want to apprear on everypage. But I want to be able to change that nav section without having to copy the new stuff into EVERY page's source code.
So is there a way to have an html file embeded into another html file? There must be a JavaScript trick or something to just take nav.htm and have it inserted into the other pages.
I'd apperciate any help you can offer http://forums.massassi.net/html/smile.gif
Argath
12-18-2002, 12:46 AM
Why don't you just use frames?
because frames are ugly?
if your server supports php, put your menu into a file called menu.html then on each page put this where you want the menu to appear (These pages will need a .php extension)
<?
include("menu.html");
?>
Is_907
12-18-2002, 08:38 AM
php == r0xb4d; (excuse the l33t =P)
I do all my sites in php now even if I don't actually use php code other than include statements. it's VERY useful
Gamma_Ray54
12-18-2002, 11:25 AM
<font face="Verdana, Arial" size="2">Originally posted by Tom:
because frames are ugly?
</font>
You realize it's possible to get rid of the border on frames, right? Then you just have two pages that butt right up next to each other, which if I understood hinch1 correctly is exactly what he needs.
yes..I know that. Though, They're still ugly because when you scroll, only one of the pages scrolls which just looks horrible, unless both pages have a solid background of the same colour, which is the only time it looks any good.
Darth Evad
12-18-2002, 02:11 PM
Are you saying Massassi looks bad????????
/me glares at Tom
------------------
It was in Bobcaygeon, when I saw the constellations reveal themselves one star at a time.
Short answer: No with a but, long answer: yes with an if http://forums.massassi.net/html/wink.gif
poley
12-18-2002, 05:46 PM
frames can look alright as long as they're done in a good way.....
www.section31.org.uk (http://www.section31.org.uk) (my site done about 3 years ago when i hadn't heard of php)
but yeah php is a better way to go really...ie see link for simpleish version......(should point out that was done by raynar and not me, time allowing should be updated soonish)
------------------
"He who fights with monsters might take care lest he thereby become a monster. And if you gaze for long into an abyss, the abyss gazes also into you." -Friedrich Willhelm Nietsche
Rbots website (http://rbots.massassi.net)
[This message has been edited by James Bond (edited December 18, 2002).]
hinch1
12-18-2002, 09:59 PM
I don't have PHP support on my site. And I don't like frames because they don't scroll with the rest of the page.
But I found a solution using SSI http://forums.massassi.net/html/biggrin.gif
<!--#include virtual = "nav.htm" -->
Thanks for the help anyways though http://forums.massassi.net/html/smile.gif
Pommy
12-18-2002, 11:00 PM
I was just about to suggest the solution you just found. Curse you.
Malus
12-19-2002, 07:19 AM
<font face="Verdana, Arial" size="2">Originally posted by Darth Evad:
Are you saying Massassi looks bad????????
/me glares at Tom
</font>
Actually, it does look kind of bad.
lateralus
12-19-2002, 04:02 PM
heathen!
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.