Help - Search - Members - Calendar
Full Version: I need help with my Site Menu BADLY
HTMLHelp Forums > Web Authoring > Web Site Functionality
adn258
okay so on our site here GO HERE that is the page that has my nav bar code. Which has javascript code in it and so on. You need not worry about that though the only thing you need to know is that the actual page itself has HTML which references javascript and so on. See I don't want to have to repaste the navbar code in every page but instead update ONE FILE that changes it universally on the site. So I tried using the code bellow and making that page an object WHICH DOES WORK but the only problem is that when you click a link in the navbar it loads the page in the NAV BAR SPACE ITSELF i.e. the 800 by 150 pixel size because it's a container. Is there any way that I can bypass this? Is there any way I can get that navbar to work right without loading in a container and being able to change it with just one file? PLEASE HELP

<object type="text/html" data="http://www.battleforjustice.com/na… width="800" />

</object>
Darin McGrew
Please see the FAQ entry How do I include one file in another?
Paul Chater
I will echo Darin, server side includes are probably a good idea. Could you post a link with what you're fully trying to achieve because I don't really quite understand what you're trying to achieve with it. Although I would say one thing. If you want a snazzy drop down menu then use nested list items instead of having division containers you can achieve quite a bit with list items. I have a little jQuery script which you can get the drop down there. It's just a matter of CSS STyling etc.
Christian J
There are some validator errors: http://www.htmlhelp.com/cgi-bin/validate.c...navbarpage.html

If you're making the navigation entirely from JS you can use an external JS file, but this may not work for search engines, or for users without JS (you must of course still add the SCRIPT element that loads the JS file on every page).

You can't both load an external JS file and keep content between the start and end SCRIPT tags.
pandy
A JS only meny is an abomination. There's a nice list there now. Keep it like that.
adn258
I think people missed my point I don't want to use server side scripting and when I use the <object technique to embed that navbar shown above if you read; then it includes the file but when you click a link it opens it in that CONTAINER i.e. the object which is the containing element so my questions is I suppose how can I stop that?
pandy
You describe frames.

May I ask why you don't want to use something serverside? Isn't it available to you?
adn258
unfortunately no it's not pandy the only thing that I can do is figure out some way to embed that object which works but when I do that what happens is when you open up a link it opens it up in another little page WITHIN the page i.e. the container it doesn't open it up in the whole page. Is there a way to bypass this?
pandy
Not that I know of, not without JS anyway. As said, you want the functionality of frames, not that I suggest you should actually use frames. tongue.gif

If you can't do it on the server, then you have to do it locally before you upload the pages. I think there's a link to different preprocessors in the FAQ, otherwise it's basically just Find & Replace. The downside is, of course, that you need to upload all pages when you make change to the menu, but you don't have to edit all of them by hand.
adn258
darn alright it doesn't look like what I am trying to do is possible without server side scripting which I can't and don't want to use like PHP I just wish there was some way to do this but it doesn't seem possible
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.