View Full Version : Tab Menu with a click instead of mouseover

07-17-2006, 05:44 PM
1) Script Title: Is it possible to use onmouseclick instead of onmouseover?

2) Script URL (on DD):
Tab Menu (onMouseover)

3) Describe problem:
I like this script. But I want to change the mouseover action to onClick, which means to access the second level menu, I want user to click it instead
of placing the mouse on it. I tried to replace the 'OnMouseOver' keyword to 'Onclick', but when I clicked one of the item, it immediately submit my form to an address with the '#', which the browser gave error.
Can anyone tell me how I can change it? Thanks a lot.

07-17-2006, 05:56 PM
If you do not want the browser trying to load the href, you need to use return false with an onclick event on a link, ex:

<a href="http://www.javascriptkit.com" onclick="showit(0);return false;">JavaScript Kit</a>

07-18-2006, 05:37 PM
Thanks jscheuer1, I applied your suggestions and it worked excellent.