DHTML menus with delay

Navigation

Skip navigation.

Site search

Site navigation

Details and download

Making menus using visibility in DHTML

Please note, this menu suffers from the Gecko engine mouseout bug and layer tag bug in Mozilla and other Gecko based browsers like Netscape 6+. I have resolved these issues in the even more advanced Auto-generation Popup Menus with delay version. This menu also does not validate, and it is not intended for real use, it's just here so you can understand the complexity required for these things. The auto-generation version deals with these problems.

To download the script(s), see the script license, and check details like browser compatibility, use the links on the navigation panel at the top of this page.

This show/hide part of this menu system works the same way as the basic menu system. This version is special because I have made the menu cells highlight, and the tables automatically close after 500ms if the mouse is not over any part of them. To achieve the closing effect, I have used the unofficial <layer ...> tag in Netscape 4 because when using that syntax, I can make it detect events without having to say to capture them first.

The highlight effect is a bit more messy. The cells are held in a table. The cells are made using a <td> element. In non-layers browsers, this can detect mouseovers etc. When they are detected, the backgroundColor style is changed (in Opera versions lower than 6, the background style is changed). In layers browsers, an unpositioned layer is held within an <ilayer>, within the table cells. The 'ilayer' - 'unpositioned layer' combination positions the layer directly over the top of the ilayer. The layer can detect the mouseover and mouseout events. When these are detected, the layerObject.bgColor is changed.

Notes in layers browsers:

Google
Lycos
Alta Vista
This is an extra level (third level)
This is also an extra level (third level)
This one is not a link
A third level
Another third level
This is an extra level (second level)
Fudge
Baby food
Cat stew
Maps to stars' homes
An extra level
Another extra level
Bomp Bomp Bomp
The Camel Lost His Hump
He Sat On A Peg
After He Broke His Leg
And He Lost His Handbag Too
The Wuss!
Search Insane Links Camel Poem Home
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.