Feed on Posts or Comments

Personal Daantje on 20 Dec 2006 12:01 am

CSShyarchMenu

This Javascript will generate a nice hiarchical dropdown menu in DHTML (not xhtml!). This script is tested under firefox, mozilla, opera and msie 6. All layout stuff can be configured in the CSS stylesheet. I’ve build this script only for some of my own sites. But to make your life easy I’ve made it open source ;) This menu can do vertical suff also, it’s configurable in this version. You may use the script any way you like, but a link back to me would be nice ;)

FEATURES:

Here are the features of the current version 0.6:

  • Easy to generate with a server side scripting language like php or asp.
  • CSS layout
  • Crossbrowser
  • LGPL

See history for more information…

ROADMAP:

If you feel the urge to help out…

  • Make it a class.

HISTORY:

Here are the changes made sinds this script is open source.

  • current version 0.6
    • Now you can do both right and bottom submenu’s. Needed it for a new project of mine. ;)
    • Changed the license to LGPL.
  • version 0.5:
    • Fixed te wrong positioning on reload (thnx Repo) and on resize (Lukas Ziegler)
    • Added support for ‘javascript:’ links.
    • Added ‘_parent’ target
    • Moved width configuration of divs to the stylesheet, don’t know who to thank for this bug report.
    • Fixed hover problem with mozilla based browsers.
    • Split example to seperate html, js and css file.
  • version 0.4:
    • Fixed the wrong positioning in some Mozilla based browsers. (Thanx to Fabiana Faria and Dan Seddon for the bug reports.)
    • Added more options to config the position of the submenus, so you can config the overlap. (Thanx to Bokko for the idea.)
    • Added a patch to reload the page after resize, so the position of the submenu’s are recalculated. (Thanx to Lukas Ziegler for the bug report)
  • version 0.3:
    • Now fixed the iFrame bug in Firefox. Included the iFrame example. (Thanx to fossil for the bug report.)
  • version 0.2:
    • Now you can configure the alignment of the submenu, bottom or right.
    • It’s now possible to seperate configure the layout of the last menu item too.
    • Did some changes on the targeting. But still needs some debugging.

LICENSE:

LGPL (http://www.gnu.org/licenses/lgpl.txt)

SUPPORT:

Please report any bugs to me at daantje dot nl

DONATE:

Please support this project by paypal donations, (my email is my paypal address)

Help me develop this and other projects. Donate to the good cause.
donation button

DOWNLOAD:

Download and untar the file (tar -zxvf CSShyarchMenu.tgz), upload it and point your browser to one of the examples. Windows users can use WinRAR to decompress the file.

EXAMPLE

There is an example with an iframe included in the package.

Here are a few implemented versions of this script.

2 Responses to “CSShyarchMenu”

  1. on 12 Mar 2007 at 3:26 pm 1.lukis said …

    Hi
    I needed to delay buildSubmenu function for IE couse sometimes after changing page (clicking menu) IE did not show next page, just error message. I did 100ms delay on this function and now its ok. Can u pls tell me why such thing is happening? I believe it has something common with Js errors which this menu scripts does:

    buildSubmenu is not defined
    hideSubmenu is not defined

    those erros appear sometimes when u fast switch between pages for example.

    Regards

  2. on 13 Mar 2007 at 12:22 pm 2.lukis said …

    previous solution doesnt work i think so i searched for another and here is what i changed:

    setTimeout(function () { document.getElementsByTagName(’body’)[0].appendChild(subObj);
    }, 100);

    anyway appendChild function can make operation aborted error in IE.

Trackback | Comments RSS Feed

Leave a Reply

You must be logged in to post a comment.