SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Menu bar hassle

  1. #1
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Menu bar hassle

    Hi. I have a menu bar with several links on EACH and EVERY page of my 100 page web site. The menu, or navigation, bar is exactly same. The problem is, if I want to change the links on the menu bar, I have to go to every page and modify it. Is there a solution with out using frames? Maybe adding a JavaScript file into a table of the menu bar??

  2. #2
    SitePoint Member
    Join Date
    Nov 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think what I need is INCLUDE statements to CALL the JavaScript file from all my HTML files?

  3. #3
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are two possible approaches:

    Server-side includes (via ASP, JSP, PHP or other server-side tools) You write the menu once, and it's included by the server as the page is sent out. This one is technically better, but it requires access to server-side tools.

    Use an external javascript file to write the menu into the page on the client. See the second site in my .sig for a fairly simple example. This has the drawback that it requires javascript to work, and probably isn't wonderfully accessible, but it doesn't need server tools, which is great for people with really bare-bones web hosting.

  4. #4
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    another way is an iframe menu, which will work with javascript off, but this is better within a <noframe> to go with the javascript menu. Be careful though, the iframe menu usually ends up with a low PR
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


Bookmarks

Posting Permissions

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