Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New to the CF scene
    Join Date
    Oct 2004
    Location
    Surrey, UK
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need Help! Embeddign Html In Html

    right

    i wanna use this nav on my website

    http://www.dynamicdrive.com/dynamicindex1/navigate1.htm

    but

    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
    Last edited by sChLiK; 10-21-2004 at 02:50 AM.

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    The US of A
    Posts
    767
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That style section, toss that into a CSS file, call it nav.css, tehn add this to your <head>

    Code:
    <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>

    Code:
    <script type="text/javascript" src="path/to/nav.js"></script>
    Then add your plain old HTML to where ever you want to add it. Peace

  • #3
    New to the CF scene
    Join Date
    Oct 2004
    Location
    Surrey, UK
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Kurashu
    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)

  • #4
    Regular Coder
    Join Date
    Aug 2004
    Location
    The US of A
    Posts
    767
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #5
    New to the CF scene
    Join Date
    Oct 2004
    Location
    Surrey, UK
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 ?

  • #6
    New Coder
    Join Date
    May 2004
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #7
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:
    Code:
    <?php include("filename"); ?>
    SSI or ASP:
    Code:
    <!--#include file="filename"-->
    (I'm not totally sure they're right - I'm pretty crap at server side stuff .)
    Last edited by chilipie; 10-27-2004 at 09:16 AM.

  • #8
    Regular Coder
    Join Date
    Aug 2004
    Location
    The US of A
    Posts
    767
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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).

  • #9
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    You may want to look at Includes

  • #10
    New to the CF scene
    Join Date
    Oct 2004
    Location
    Surrey, UK
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    gaaahhhhhhh

    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

  • #11
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •