Forum Moderators: open

Message Too Old, No Replies

Javascript to load navigation bar?

         

noclu

10:30 pm on Nov 14, 2007 (gmt 0)

10+ Year Member



Hi, I am having trouble getting my head around this. I have a navigation bar that consists of drop-down menus made from <li> </li> tags, styled with CSS. There is some javascript that my friend wrote for the drop-down effect. Long story short it looks great in all major browsers but the toolbar script/lists are in every HTML file of my site, so it cannot be easily updated. What kind of process is involved in separating the toolbar so that you just refer to a central file to load it into all of your pages? What kind of file would that be? I have no knowledge of asp or php, and only a tiny bit of java. please, enlighten me! thanks

daveVk

11:45 pm on Nov 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[webmasterworld.com...] may be relevent

Dabrowski

3:08 pm on Nov 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not quite what he's after, that works for JavaScript.

Check out Server Side Includes - SSI. You can put chunks of HTML in include files and the server will include them as it feeds the page to the browser.

Extremely easy to implement, and transparent to the browser. No css or JavaScript required!