www.webdeveloper.com
Results 1 to 9 of 9

Thread: Navigation

  1. #1
    Join Date
    Dec 2002
    Location
    Newcastle on Tyne, United Kingdom.
    Posts
    6

    Navigation

    I am building a site with quite a lot of pages which would be added to every month.
    I would like to have a drop down menu on every page that would link to all my pages.
    But the problem would be that when I added a new page I would have to go into every page on site and change it.
    Is there a way to change one link in menu so it affects all menus on every other page.

    Or is there any suggestions? On This Kind Of Navigation?
    I would like to put all these links into a drop down menu.

    http://amazing.as/johnmacsusatravel/USAMENU.html


    Thanks
    John Mac

  2. #2
    Join Date
    Nov 2002
    Posts
    984
    Do you have access to serverside methods (eg SSI, ASP, PHP, CGI etc) to include sections onto your page from extarnal files?

    If not your best solution is probably to use frames or iframes to link to an external navigation menu.
    There are other clientside options too, but these two are the most crossbrowser methods.
    // Stefan Huszics

  3. #3
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    The best solution I can think of is using server-side technology like Server Side Includes (SSI), or PHP.

    I assume you are using an Apache server, if so it is likely you'll have one or the other SSI is the easier one to use.

    An example of SSI command would be like
    Code:
    <!--#include file="sample.txt"-->
    which would inset the contents of a file called sample.txt into your document. You might have to covert your *.htm to *.shtml to get it to work on your server.

    Stefan is too fast at typing .

  4. #4
    Join Date
    Dec 2002
    Location
    Newcastle on Tyne, United Kingdom.
    Posts
    6

    Navigation

    Thanks Stefan I Will Try My Best To Look Into This And Try To Get Help From College To Implement This
    John Mac

  5. #5
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    If you are using dropdown menus, then you are probably using DHTML to create the dropdowns.

    A simple solution is to put the menu contents into an external .js file which will be used by all pages. All you need to do now is to update the external .js file and all you pages will now have the new dropdowns.

    HierMenus uses this technique. I'm not sure where you find it but a simple 'google' search should get you there.

    Hope this helps!

  6. #6
    Join Date
    Nov 2002
    Posts
    984
    Originally posted by nedals
    If you are using dropdown menus, then you are probably using DHTML to create the dropdowns.

    A simple solution is to put the menu contents into an external .js file which will be used by all pages. All you need to do now is to update the external .js file and all you pages will now have the new dropdowns.

    HierMenus uses this technique. I'm not sure where you find it but a simple 'google' search should get you there.

    Hope this helps!
    Relying on JavaScript for the site navigation to even work is very very very bad.
    The navigation is about the most important thing on your entire site and should never be left to rely on client side scripting.

    That said, if you provide a proper <noscript> backup on every page, eg a link to a plain html site map, then this combination might be a usable option.

    In any case you can make dropdown menus purely in CSS too. The obvious benefit of that is of cource that if JavaScriopt or even CSS is not available the navigation will still work. That IMO makes them clearly superior to any JS hiermenus.
    // Stefan Huszics

  7. #7
    Join Date
    Dec 2002
    Location
    Newcastle on Tyne, United Kingdom.
    Posts
    6

    Navigation

    Thanks again Steffan.

    I think the simplest solution would be provide a proper <noscript> backup on every page, eg a link to a plain html site map, then this combination might be a usable option.

    This idea will work for me. I will try that.

    Thanks Once Again.
    John Mac

  8. #8
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    I see, one was originally thinking more on the lines of a dropdown navigation menu inserted via SSI within a form using PHP script for action, rather than JavaScript, so it wouldn't break in a non-JavaScript enabled browser.

    Code:
     <?
    if($inchoice=="XHTML")
    header("Location: http://www.xhtmlcoder.com/");
    if($inchoice=="W3C")
    header("Location: http://www.w3c.org/");
    ?>
    Yes, the Pure CSS solution is very good as long as you don't use Micro$oft Explorer, then it degrades gracefully.
    Last edited by Robert Wellock; 12-19-2002 at 02:23 PM.

  9. #9
    Join Date
    Dec 2002
    Location
    Newcastle on Tyne, United Kingdom.
    Posts
    6
    Thanks Robert And Everyone, I am now working on new navigation system to add to my revamped site layout for late January 2003.
    John Mac

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles