View Full Version : Need Help! Embeddign Html In Html
10-21-2004, 02:46 AM
i wanna use this nav on my website
if u notice theres a hideous amount of html to be put in the body section of EACH of my 100+ (when its finished) web pages for my site.
my query is, is there anyway to have all the BODY html for the navigation in just one notepad file or html file and in each webpage use some sort of coding to "read" the nav BODY code ???
the idea is so that when i keep updatign and adding/removing webpages, i dont have to edit the same link in eahc webpage ovre and over again.
instead i just open the navigation html file and make my changes in that, re upload it and then hopefully each webpage as it laods will read the new links from that file
so do you use the isert tag or embed tag for this ? im a complete newbie!
hope this all makes sense
10-21-2004, 02:55 AM
That style section, toss that into a CSS file, call it nav.css, tehn add this to your <head>
<link rel="stylesheet" type="text/css" media="all" href="path/to/nav.css" />
For the JS code, toss that into a .js file, let's call it nav.js, and then add this to your <head>
Then add your plain old HTML to where ever you want to add it. Peace
10-21-2004, 03:05 AM
Then add your plain old HTML to where ever you want to add it
cheers for the JS and CSS help, but what coding do you use to load the external html file into the current html body section ? (if its possible)
10-21-2004, 03:50 AM
You don't, unless you're using a Server Side Langauge like PHP, or you use a SSI if your server is set up for that.
10-21-2004, 08:14 PM
what a ssi ?!?!?!
sureley there must be a way of just puttign the navigation html in say nav.html and using a code reference in the body section of a different webpage to load the nav.html coding into the webpage so that when the page loads its like the nav.html code is just written in the body tag ?
10-21-2004, 08:30 PM
Server Side Includes
10-21-2004, 08:38 PM
SSI - Server Side Includes
Basically it includes an (X)HTML file in another (X)HTML file. It's kind of like an IFrame but simpler.
<?php include("filename"); ?>
SSI or ASP:
(I'm not totally sure they're right - I'm pretty crap at server side stuff :p .)
10-21-2004, 09:01 PM
The PHP one works if short tags are enabled, and teh SSI oen is right, I'm not sure if it is the same for ASP (never used it).
10-21-2004, 09:04 PM
You may want to look at http://www.codingforums.com/showthread.php?t=35778
10-26-2004, 11:16 PM
i have no dea what any of this stuff is
im only just starting out using geosh!tties.
basically i wanna put a tree folder navigation into my tabled website.
however because i will be constantly adding and updating pages i need a navigation code that requires updating preferably once rather than updating it on every page.
i kno wnothing about sql perl php ssi scsi usb client side server side ftp and the wahtevers its all fffffft over my head and too much too soon. i know this is easy peasy to most of you but on a scale of 0-10 of html knowlege im prolly abuot 1.5
any help in non jargon is much appreciated
10-26-2004, 11:32 PM
Since the suggested options won't work for you, have you considered frames?
Definitely not the best option, there are numerous drawbacks. But it may be the option best suited to your needs and resources. Basically, your navigation resides in one html file, and that file appears in one frame, while your various content files appear in another. For changes to your navigation you would need only edit one file.
But (and this is a big but) if you are building a site that's 100+ pages using only html you are likely in for a painful experience unless you get into some server side language like PHP.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.