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 5 of 5

Thread: Navbar Help!

  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Navbar Help!

    How can you update a NAVBAR without having to go through every page in your website and updating it?

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Location
    Raleigh, NC
    Posts
    273
    Thanks
    7
    Thanked 59 Times in 52 Posts
    The easiest way to do it is to use a server-side language like PHP to include the snipped page to page. If that's not available to you, you could alternatively build the navigation every page dynamically through javascript--but that'd incur some page load hits.

  • #3
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I found this page with the type of nav bar I want(http://www.dynamicdrive.com/dynamici...davidmenu.htm). It uses .js to edit the content of it but I don't want it to pop in and out everytime I click it. I want it to be like this (http://www.dynamicdrive.com/dynamicindex1/slashdot.htm). Any ideas how I could change the code?

  • #4
    New Coder
    Join Date
    Aug 2007
    Posts
    58
    Thanks
    2
    Thanked 6 Times in 6 Posts
    I don't mean to sound like a jerk here, but I would recommend you to NOT use Javascript for navigation. I would suggest sticking to something CSS and HTML based, and then use PHP or another server-side language to include it in every document. I would use Javascript for compatibility in a menu, but not for the menu itself, and then say in a noscript tag that you may potentially have problems with the navigation menu if Javascript is disabled, and list the browsers that require the Javascript, and possibly direct them to a better browser if their browser fits the requirements.

  • #5
    Regular Coder saeed's Avatar
    Join Date
    Oct 2002
    Location
    West Yorkshire
    Posts
    343
    Thanks
    32
    Thanked 0 Times in 0 Posts
    well... u can use Javascript includes with Cascade Style Sheets.


    lemme know if u want to know more.


    ATB!


    Saeed.
    Don't click on this!

    #!/usr/bin/saeed


  •  

    Posting Permissions

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