Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cascading menu assistance and advice

Status
Not open for further replies.

voddie

Programmer
Joined
May 20, 2006
Messages
1
Location
GB
Hi

I very new to javascripting and through searching through example menus available on the web I have managed to build a menu for my forthcoming shop and require a little advice.

The menu is built so that each main menu and sub menus are a certain color on hover.

see working demo at
download js file at
The menu is working and all the links work.

The trouble is when you click on a sub menu and the page reloads, the menu is closed. How do I get the menu to be open on page reload?

ie. if clicked "studs" under "football boots", I require the menu "football boots" to be open when page reloads. If I then choose "foreign shirts" under "apparel", the "apparel" sub menu should be open on page reload.

Can any one assist me please, thanks in advance

Voddie
 
Hi Voddie
I would like to share some bad news with you.
I only discovered it myself yesterday but the up and coming, new kid on the block, Firefox, has kittens when it comes to javascript menus.
I have a few sites which use such menus and they have worked for many years with no problems at all but with Firefox, they simply don't work, it is annoying but that's progress, or so the experts tell me.


Keith
 
Keith, could you give some background to that rather surprising statement?

As far as I know:
1. Firefox has been around for several years
2. Although Javascript can be disabled in FF (as it can in IE) it normally works fine

The problem with Javascript menus (if there is no alternative navigation) is that those viewers with Javascript disabled (and that includes the search engines in general) will be unable to navigate!

voddie, do a search on this site for CSS menus if you want some smart and functional menus

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Code:
that rather surprising statement
Hey John
Not here to cause problems but my menus do not work in Firefox and nether do voddie's, thought it best to let him know, especially if like me, he hadn't tested it in Firefox.

1 Internet, numerous standards- Must be the work of academics!

Keith
 
Blaming a new, standards compliant browser because badly-written, IE-only code doesn't work on it displays a clear lack of underdstanding of the actual problem.

Yes, I'm making assumptions with that statement (that the menus in question were badly written), but at least I'm making that assumption based upon years of experience as a web developer, rather than making assumptions (that Firefox is to blame) based on nothing more than hype and hearsay.

Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
>1 Internet, numerous standards- Must be the work of academics!
...the work of intellect, knowledge and compromise, and acadamics too, why not, more so the better.
But there is also money and power play. Standards does not come out innocently. There are technology-leader, innovators who work on the territory off-standards and then there are stakeholders. Think not who-is-who sit in the committee?

>at least I'm making that assumption based upon years of experience as a web developer
Does truth have weight on year-count? I don't think so. It can be a negative factor in some circumstances.

 
Dan
Code:
Blaming a new, standards compliant browser because badly-written, IE-only code doesn't work on it displays a clear lack of underdstanding of the actual problem.
I have only been aware that there is a problem for the last few days.
Badly written or not, the fact is they do not work, something I find annoying but also interesting.
I am reading up on the actual cause and if it is my code that has been written badly then I will take the necessary steps to make it work. I was simply admitting to making the mistake of not testing it in other browsers and passing this information to someone else who appears to have made the same mistake.
The fact that my code validates correctly gave me the impression that it was correct but it is clearly faulty.
I too have spent many years developing software in a number of environments, the problem seems to be that code which, at one time was acceptable, no longer functions correctly.


Keith
 
Keith, if its the studiosoft site that we're talking about (appears to be your home site) then it shows a whole list of validation errors, including the fundamental "no doctype". The errors on your site are not that surprising as it appears to have been written in FrontPage 4, which is probably not the tool of preference for most professionals!

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
True - it is my home site but that is not the one in question although the javascript problem is evident there too.
That site was written many years ago and desperatley needs a rewrite and will get one when time permits.

I entered this thread in an attempt to assist someone who, it would appear, has made the same mistake as I did, and nothing more.



Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top