Javascript navigation problems

This is a discussion on "Javascript navigation problems" within the JavaScript Forum section. This forum, and the thread "Javascript navigation problems are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 29th, 2007, 23:15
Reputable Member
Join Date: May 2006
Location: Scotland
Age: 18
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript navigation problems

Well I have been trying to get this navigation for a while. Its a two level horizontal navigation. I have two problems which I can see:

1. When you hover over a link the sub links stay up when you hover over another main link so they have multiple links overlapping.

2. I wanted to display the currect pages sub links as default then they are replace by the hovered over sublinks. Eg. If you are on the excercise page then treadmills, bands links are shown when you aren't hovering over any links. Then when you hover over a link such as clothing the sublinks change to basketball, football for clothing.

You can see my coding so far: http://www.fuvz.com/sporting/index.html
Reply With Quote

  #2 (permalink)  
Old Sep 30th, 2007, 10:54
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript navigation problems

The more fundamental problem is that your navigation fails completely when javascript is off.

Validate your HTML. Your id's must begin with a letter, not a number.

You need to set "display: none" onmouseout, or make each link's onmouseover set this for all other links. At the moment, the only way to clear a menu is to hover over the link a second time!

Last edited by MikeHopley; Sep 30th, 2007 at 10:57.
Reply With Quote
  #3 (permalink)  
Old Sep 30th, 2007, 10:57
Reputable Member
Join Date: May 2006
Location: Scotland
Age: 18
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript navigation problems

Yeah that was another problem I have. I also hear you could do this navigation type purely using CSS. That would be better. I have been searching around but still can't work it out though.

Anyone be able to help. I really need this part done so I can get on with the rest .
Reply With Quote
  #4 (permalink)  
Old Sep 30th, 2007, 10:59
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,637
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Javascript navigation problems

Have a look at this thread: http://www.webforumz.com/new-to-web-...htm#post274814. It has alot of good links.
Reply With Quote
  #5 (permalink)  
Old Sep 30th, 2007, 12:04
Reputable Member
Join Date: May 2006
Location: Scotland
Age: 18
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript navigation problems

I have changed to a purely css navigation. Only two problems which I have and cannot fix.

1. Main Links only the top is a link. If you hover over bottom nothing happens.

2. Sub links are higher than active. When padding is changed is puts backgrounds out.

Coding: http://www.fuvz.com/sporting/index2.html
Reply With Quote
  #6 (permalink)  
Old Sep 30th, 2007, 12:06
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,637
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Javascript navigation problems

1. They are all links for me...
2. Does it work with Margin? Sometimes it does.
Reply With Quote
  #7 (permalink)  
Old Sep 30th, 2007, 12:08
Reputable Member
Join Date: May 2006
Location: Scotland
Age: 18
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript navigation problems

They are all links but the area for the link is too small in FF anyways. If you hover over below middle on the top links it would select.
Reply With Quote
  #8 (permalink)  
Old Sep 30th, 2007, 12:13
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,637
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: Javascript navigation problems

It looks fine for me
Reply With Quote
  #9 (permalink)  
Old Sep 30th, 2007, 12:22
Reputable Member
Join Date: May 2006
Location: Scotland
Age: 18
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript navigation problems

What browser? If I hover over bottom half of top level links they dont highlight the link. In both IE6 and FF it seems to do that. I managed to sort sub link background out in firefox but its off in IE6 now.

This nav is killing me
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigation problems in safari mikka23 Web Page Design 5 Mar 24th, 2008 21:00
javascript navigation buttercup JavaScript Forum 3 Jan 24th, 2008 10:22
Problems with my navigation Anonymous User Web Page Design 3 Jun 15th, 2007 22:14
JavaScript Navigation II soda JavaScript Forum 3 Sep 29th, 2005 11:44
Navigation problems... courtjester Flash & Multimedia Forum 3 Jan 27th, 2004 07:43


All times are GMT. The time now is 10:44.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43