Results 1 to 7 of 7

Thread: Updating a menu from one place

  1. #1
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Updating a menu from one place

    Hi,

    I was wondering what is the best way to load a menu from one place rather than adding additional parts of a menu to each page of a website.

    Many Thanks.

    Ian

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Well, you could either use ajax, or PHP. I'd suggest using PHP, not all browsers and people support javascript & ajax. If you can use PHP that'd be good. Heres what you do:
    Make a file called menu.html, this will hold your menu, so put your menu code in there.
    Every file but menu.html(this is optional to have it.) Should have a .php extension. So, where you wanna put your menu, you can just do this:
    Code:
    <?php include('menu.html'); ?>
    Hope this Helps,
    Nile
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    johnsoip (04-17-2008)

  4. #3
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I'll give this a go.

    Ian

  5. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    But you have to make sure that your host allows PHP, what host do you use? If you tell me I might beable to tell you if they do.
    Jeremy | jfein.net

  6. #5
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I'm using 123-reg, I don't think they do actually.

    Ian.

  7. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Yeah, looks like they support PERL though... I think you should get a different host or email them to ask if they can give you PHP.
    Hope this Helps,
    Nile
    Jeremy | jfein.net

  8. #7
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    If you cannot use PHP, you could try this solution.
    ---
    Arie Molendijk.

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
  •