Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:16

Menu system for a simple button: keyboard handler

Poster: rstaveley
Dated: Monday August 9 2004 - 10:13:59 BST

I'm trying to create a cohesive look and feel for my site, and I like my Milonic menu... so much so that I want to carry its look and feel throughout the site wherever I have buttons.

I have the following JavaScript in a common header:

// Menu-type button - a sledgehammer to crack a nut
// perhaps, but this gives the button the same look and
// feel as the menu system
function menu_button(menu_name,button_text,button_url,status_text)
   with(milonic=new menuname(menu_name)){

Wherever I want to position a button, I embed a bit of script to call my menu_button function.

e.g. For a login form:

  <script>menu_button("Login","Submit","JavaScript:login.submit()","Submit details");</script>

I'd like to get the button to support keypresses so that the user can tab over to it and press the spacebar to achieve the same results as clicking the button.

I notice that there was some support about getting keyboard support into the menu system back in 2002. Did this come to fruition? If not, is there something else I can do to handle a keyboard even specifically on my "menu_button"?

Poster: kevin3442
Dated: Wednesday August 11 2004 - 4:30:13 BST

I don't know the status of keyboard input for the menu. I seem to recall tha Maz once reported that top-level menu items that include a standard url (a link as opposed to a js call) can be tabbed to.

I suppose you could also write your own keypress event handler and when the correct key was pressed you could pop a submenu at the button's location or call the same js that your "menu button" calls when clicked.