Navigational Bar

They have: 59 posts

Joined: Mar 2000

Hi,

I am using this script: Navigation Script, but I need help implementing it! Here's my original page. Here is a test page where I have implemented the script. The main difference between the test page and my original page is that the original page has two rows along the top. How can I make two rows with this navigation bar? Do I need a second copy of the js file with the names changed? If I try to copy the whole script twice any change affects both bars so there's no way to move one independently of the other. Please help! I can't follow all of the script from Dynamic Drive.

Any help would be greatly appreciated.
Thanks, Phyllis

Josh Simpson's picture

They have: 147 posts

Joined: Dec 1999

Hello

I just put this togeather

http://redrival.com/jls/menutest/

The menu can be movied around te page with the "moveTo(x, y)" as explained on Dynamic Drive.
is this what you want?
If it is you can use it Smiling
If you need more help just ask

[Edited by Josh Simpson on 10-24-2000 at 05:21 AM]

JLS (Joshua Lee Simpson)

They have: 59 posts

Joined: Mar 2000

Josh, thanks!

I just downloaded your sample and will give it a shot! I'd been working on my own on it (for some reason, I haven't been able to log into Webmaster-Forums all day). I got as far as this - test 3 - which is obviously screwed up (one section is duplicated & the top menu opens behind the bottom one), but I'll go through and compare my file to the sample you made and see if I can get it worked out! (Yeah, I may be asking for more help as some of the syntax is a mystery to me.) Smiling

Many thanks,
Phyllis

[Edited by phyllis on 10-24-2000 at 03:23 PM]

They have: 59 posts

Joined: Mar 2000

Okay,

I went through Josh's code stepped by step, but now I'm getting strange JavaScript errors when I try to open the page. Here's a link to the newest test page (navigation bars don't display). And here is a link to the source code (text file).

Josh, your sample works fine until I download it onto my hard drive. Then the navbar no longer displays. Is it mapped somehow to files on your system? (Did you alter the js file?). And if so, did I just do that to the my newest test file?

I'd be greatly appreciative if you guys can help me figure out the bugs in my code!

Thanks very much,
Phyllis

Josh Simpson's picture

They have: 147 posts

Joined: Dec 1999

I cant see the problem with the last post but you i can help with the third example with the top menu going behind the second.

Here

function init() {

// Get width of window, need to account for scrollbar width in Netscape.

fullWidth = getWindowWidth()
- (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);

myNavBar1.resize(760);
myNavBar1.create();
myNavBar1.setzIndex(2);

myNavBar2.resize(760);
myNavBar2.create();
myNavBar2.setzIndex(2); <----- here set the 2 to a 1 like "myNavBar2.setzIndex(1);"
myNavBar2.moveTo(0,30);
}

I had the same probem

JLS (Joshua Lee Simpson)

They have: 59 posts

Joined: Mar 2000

Josh, it's WORKING!!!

Thanks for the information about the zindex - I was wondering what that meant. I never got the last test to work (kept getting some integer error), but I fixed the zindex thing on the 3rd example and then compared it line by line to your sample. I found an extra line that was causing the duplication of one of the sections. Anyway, I'm thrilled with this! I think it will make my overall site much easier to navigate.

Here's the fully working sample now:
http://www.afsaonline.org/Credit2000/coolcredit.html

I'm about to start incorporating it throughout the site (I'm debating whether to expand the top frame & include it in the frame - I hate frames, but it might speed things up if the .js file takes a while to load).

Anyway, thanks again!
Phyllis

Josh Simpson's picture

They have: 147 posts

Joined: Dec 1999

If you are using the same menu on every page i have found you can put the whole script into a external js file and link it into the page.
So you only nead to add 2 lines of code to every page.

JLS (Joshua Lee Simpson)

They have: 59 posts

Joined: Mar 2000

Hey that's a great idea!

I don't know why I can't think of these things. Sad Oh well. I was just sitting here plugging the code in over and over. Now I'm going to STOP and try your suggestion. Laughing out loud

Phyllis

Later..... Okay, I've updated my page with all new menus now. Take a look at Credit: The Journal for Market Funded Financial Services Providers. I'm really happy with the new navigation. Laughing out loud

[Edited by phyllis on 10-26-2000 at 10:50 AM]

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.