198 users online (1 members and 197 guests)  

Thread: help


  Results 1 to 10 of 10
  1. #1
    GenomeX's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2002
    Posts
    12

    Arrow help

    Say if a large site wanted to add a new link to their navigation menu, would they have to go through every single page and add that link, or is there another way to do this?

  2. #2
    sonofmidi's Avatar

    Status
    Offline
    Join Date
    Jan 2001
    Location
    NC, USA
    Posts
    75

    2 main methods for a common nav table

    The 2 main methods for displaying and updating a nav table is using frames and includes. With a frameset, you have a common nav frame and it will display any updated links to all pages. With an include, you have a single .inc, .txt, .js or .php file with your links and it is included into as many pages as needed. You simply update the single file to update all pages. Now, if the pages already exist and there are a lot of them, you would have to manually add the includes to each page. If the pages are dynamically generated from a template, then only one edit is needed.
    Last edited by sonofmidi; 10-05-2002 at 02:41 PM.

  3. #3
    GenomeX's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2002
    Posts
    12
    I tried to use the <!--include file"whatever.html"-->, yet it didn't work.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    The format for that include command is incorrect.

    It works like this -

    Code:
    <!--#include file="whatever.htm" -->
    This only works in files with a *.shtml or *.asp extension. Give it a try.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    GenomeX's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2002
    Posts
    12
    Do I have to upload it to the internet before it will work? Because it won't work on my computer.

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Yes, you do.

    The #include command is parsed by the software on the server. Its unlikely your computer has the same software needed, tho if you have something called IIS on a windows machine it should work thru that.

    Heres a handy tutorial on using server side includes (SSI)

    http://www.carleton.ca/~dmcfet/html/ssi.html
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  7. #7
    GenomeX's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2002
    Posts
    12
    Okay. Also, are you saying that the extension at the end of the page that has the include in it has to be '.shtml'? It is currently a '.html'.

  8. #8
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    To continue using html instead oh shtml check out the following link

    http://www.javascriptkit.com/howto/htaccess4.shtml

    Dave
    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting

  9. #9
    sonofmidi's Avatar

    Status
    Offline
    Join Date
    Jan 2001
    Location
    NC, USA
    Posts
    75
    Another include method is using a JS insert.
    Open a text editor and add this:

    document.write('<a href="http://my_link_here.com">Link1</a><br>');
    document.write('<a href="http://my_link_here2.com">Link2</a><br>');
    ''
    ''
    ''
    ''
    ''
    document.write('<a href="http://my_link_here10.com">link10</a>');

    Save the file as ie: links.js

    In your HTML/HTM file, add <script type="text/javascript" src="http://path_to/link.js"></script> wherever you want the links to be displayed. One drawback to this method....Search indexers do not index JS.
    Last edited by sonofmidi; 10-06-2002 at 09:52 AM.

  10. #10
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    One drawback to this method....Search indexers do not index JS.
    Just wanted to emphasis this.

    Dave
    AHFBWEB Less customers per server, more power for you!

    Business Class Shared Hosting