View Full Version : Navbar Help!

09-30-2007, 08:00 PM
How can you update a NAVBAR without having to go through every page in your website and updating it?

09-30-2007, 08:03 PM
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.

09-30-2007, 08:11 PM
I found this page with the type of nav bar I want(http://www.dynamicdrive.com/dynamicindex1/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?

10-01-2007, 08:09 AM
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.

10-01-2007, 09:01 AM
well... u can use Javascript includes with Cascade Style Sheets.

lemme know if u want to know more.

ATB! :thumbsup: