DHTML Lab - dhtmlab.com - Hierarchical Menus Ver. 3 - Addendum VI (v3.06) | 4
Hierarchical Menus Ver. 3 - Addendum VI (v3.06)
fixes and improvements for Navigator
Why Links for Navigator?
Versions 1 and 2 of the menu script did not create link tags within the menu items for Navigator. Much reader mail included these questions:
- How can I get rid of the irritating i-bar (insert) cursor that appears when I am over the text part of the item?
- How can I get a hand cursor to appear over the items?
Since Navigator does not support the CSS cursor property, the only way to force a hand cursor to appear is by using links. So that's what we did for version 3, and managed to answer both questions above.
Big mistake!
Since our introduction of links in items, it's been one headache after another:
- Links are underlined by default, so we had to force a "not-underlined" display with JSS. Depending on page layout, this does not always work. It has for all our examples, but many readers have demonstrated cases where all the item text is underlined. There is no quick or short fix for this.
- Links were originally given the same HREF as the complete item. This led to double link execution, a problem when the link was a JavaScript URL. (see addendum2, version 3.02, where we worked around the problem)
- Fixing the problem above meant giving the links a dummy HREF, javascript:void(0), which would now appear in the status bar automatically when the user moused over the link. Since ALL links had the same dummy HREF, it created a confusing and irritating status bar display.
- Since we were using links, we gave Navigator users an added bonus: different color for visited links. Alas, the showVisited parameter variable did not always kick in, depending on page layout, like the no-underline code above.
- Finally, we introduced the quote problem in version 3.05, discussed on the previous page.
Given that it's been a nightmare accounting for the link tags in the items, and that the upcoming version 4 is a more complicated script, with more room for link tag sabotage, the best way to handle the links is to kill them off.
Good Riddance!
On the next page, we highlight all the statements related to link tags. These are to be omitted from version 3.06. Immediately after that, we'll discuss a modification that minimizes the tragedy of the link tags' demise.
First, link tag-related statements reproduced for the final time.
Produced by Peter Belesis and
All Rights Reserved. Legal Notices.Created: Mar 09, 1999
Revised: Mar 09, 1999
URL: https://www.webreference.com/dhtml/column21/addendum6/col21addVI3.html